diff -Nrup a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt 2023-05-16 18:20:15.000000000 +0200 +++ b/src/CMakeLists.txt 2023-06-06 23:28:14.979612895 +0200 @@ -77,6 +77,7 @@ endif() if(${SRB2_CONFIG_USEASM}) #SRB2_ASM_FLAGS can be used to pass flags to either nasm or yasm. if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") + set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) set(SRB2_ASM_FLAGS "-DLINUX ${SRB2_ASM_FLAGS}") endif() @@ -290,22 +291,6 @@ endif() add_subdirectory(sdl) -# strip debug symbols into separate file when using gcc. -# to be consistent with Makefile, don't generate for OS X. -if((CMAKE_COMPILER_IS_GNUCC) AND NOT ("${CMAKE_SYSTEM_NAME}" MATCHES Darwin)) - if((${CMAKE_BUILD_TYPE} MATCHES Debug) OR (${CMAKE_BUILD_TYPE} MATCHES RelWithDebInfo)) - if(${CMAKE_BUILD_TYPE} MATCHES Debug) - set(OBJCOPY_ONLY_KEEP_DEBUG "--only-keep-debug") - endif() - message(STATUS "Will make separate debug symbols in *.debug") - add_custom_command(TARGET SRB2SDL2 POST_BUILD - COMMAND ${OBJCOPY} ${OBJCOPY_ONLY_KEEP_DEBUG} $<TARGET_FILE:SRB2SDL2> $<TARGET_FILE:SRB2SDL2>.debug - COMMAND ${OBJCOPY} --strip-debug $<TARGET_FILE:SRB2SDL2> - COMMAND ${OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE:SRB2SDL2>.debug $<TARGET_FILE:SRB2SDL2> - ) - endif() -endif() - # copy DLLs to bin/ directory if building internal shared on windows if("${CMAKE_SYSTEM_NAME}" STREQUAL Windows AND NOT "${SRB2_CONFIG_INTERNAL_LIBRARIES}" AND "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}") set(ADDITIONAL_DLLS "")