File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -105,11 +105,14 @@ function(generate_build_configurations)
105105 # But also include DEFAULT_EXE_LINKER_FLAGS (/DEBUG:FULL) for completeness
106106 list (APPEND TARGET_LINK_OPTIONS_LOCAL "$<$<STREQUAL:$<CONFIG>,${triplet} >:${DEFAULT_EXE_LINKER_FLAGS} ;${linker_flags} >" )
107107 elseif ("${CMAKE_BUILD_TYPE} " STREQUAL "${triplet} " )
108- # For single-config, append to base flags (don't use TARGET_LINK_OPTIONS to avoid duplication)
108+ # For single-config, append to base flags including DEFAULT_EXE_LINKER_FLAGS
109109 # Preserve CMake's defaults including standard libraries
110- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${exe_linker_flags} " CACHE STRING "" FORCE)
111- set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${shared_linker_flags} " CACHE STRING "" FORCE)
110+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${DEFAULT_EXE_LINKER_FLAGS} ${ exe_linker_flags} " CACHE STRING "" FORCE)
111+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${DEFAULT_SHARED_LINKER_FLAGS} ${ shared_linker_flags} " CACHE STRING "" FORCE)
112112 message (STATUS "Single-config: Applied ${triplet} linker flags to base CMAKE linker flags" )
113+ # Also add to TARGET_LINK_OPTIONS for propagation to external consumers
114+ list (APPEND TARGET_LINK_OPTIONS_LOCAL "${DEFAULT_EXE_LINKER_FLAGS} " )
115+ list (APPEND TARGET_LINK_OPTIONS_LOCAL "${linker_flags} " )
113116 endif ()
114117
115118 # Set platform-specific variables
You can’t perform that action at this time.
0 commit comments