@@ -38,6 +38,9 @@ endfunction()
3838# TARGET_COMPILE_DEFINITIONS - Compile definitions for each configuration
3939#
4040function (generate_build_configurations)
41+ # Determine if we're using a multi-config generator (Visual Studio, Xcode) or single-config (Ninja, Makefiles)
42+ get_property (is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
43+
4144 # These variables will be built up in _LOCAL variants and set in parent scope at the end
4245 set (TARGET_COMPILE_OPTIONS_LOCAL "" )
4346 set (TARGET_LINK_OPTIONS_LOCAL "" )
@@ -97,7 +100,10 @@ function(generate_build_configurations)
97100 # Append to existing flags to preserve CMake's defaults (including standard libraries)
98101 set (CMAKE_EXE_LINKER_FLAGS_${triplet_upper} "${CMAKE_EXE_LINKER_FLAGS_${triplet_upper} } ${exe_linker_flags} " CACHE STRING "" FORCE)
99102 set (CMAKE_SHARED_LINKER_FLAGS_${triplet_upper} "${CMAKE_SHARED_LINKER_FLAGS_${triplet_upper} } ${shared_linker_flags} " CACHE STRING "" FORCE)
100- list (APPEND TARGET_LINK_OPTIONS_LOCAL "$<$<STREQUAL:$<CONFIG>,${triplet} >:${linker_flags} >" )
103+ # Include default linker flags for propagation to external consumers
104+ # UE4SS is a SHARED library, so use DEFAULT_SHARED_LINKER_FLAGS (which is currently empty)
105+ # But also include DEFAULT_EXE_LINKER_FLAGS (/DEBUG:FULL) for completeness
106+ list (APPEND TARGET_LINK_OPTIONS_LOCAL "$<$<STREQUAL:$<CONFIG>,${triplet} >:${DEFAULT_EXE_LINKER_FLAGS} ;${linker_flags} >" )
101107 elseif ("${CMAKE_BUILD_TYPE} " STREQUAL "${triplet} " )
102108 # For single-config, append to base flags (don't use TARGET_LINK_OPTIONS to avoid duplication)
103109 # Preserve CMake's defaults including standard libraries
0 commit comments