Add parametrized build script

[ci skip]
This commit is contained in:
Anonymous Maarten 2024-10-05 01:32:27 +02:00 committed by Anonymous Maarten
parent 57f2577c65
commit 45dfdfbb7b
31 changed files with 1820 additions and 927 deletions

View file

@ -46,7 +46,7 @@ function(SDL_AddCommonCompilerFlags TARGET)
cmake_push_check_state()
check_c_compiler_flag("-gdwarf-4" HAVE_GDWARF_4)
if(HAVE_GDWARF_4)
target_compile_options(${TARGET} PRIVATE "-gdwarf-4")
target_compile_options(${TARGET} PRIVATE "$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:-gdwarf-4>")
endif()
cmake_pop_check_state()
endif()