mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix(build): handle CMAKE_BUILD_TYPE with generator expressions
Since we've started using ninja's multi-config generator, evaluating CMAKE_BUILD_TYPE at configure-time is no longer reliable. Thankfully, CMake offers "generator expressions" that are evaluated during build system generation, which allows us to continue using these conditional flags without much headache Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
parent
49b66d8a54
commit
85849fea41
2 changed files with 18 additions and 26 deletions
|
|
@ -1412,8 +1412,8 @@ install(TARGETS ${Launcher_Name}
|
|||
)
|
||||
|
||||
# Deploy PDBs
|
||||
if(WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
|
||||
install(FILES $<TARGET_PDB_FILE:${Launcher_Name}> DESTINATION ${BINARY_DEST_DIR})
|
||||
if(CMAKE_CXX_LINKER_SUPPORTS_PDB)
|
||||
install(FILES $<TARGET_PDB_FILE:${Launcher_Name}> DESTINATION ${BINARY_DEST_DIR} OPTIONAL)
|
||||
endif()
|
||||
|
||||
if(Launcher_BUILD_UPDATER)
|
||||
|
|
@ -1455,8 +1455,8 @@ if(Launcher_BUILD_UPDATER)
|
|||
)
|
||||
|
||||
# Deploy PDBs
|
||||
if(WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
|
||||
install(FILES $<TARGET_PDB_FILE:${Launcher_Name}_updater> DESTINATION ${BINARY_DEST_DIR})
|
||||
if(CMAKE_CXX_LINKER_SUPPORTS_PDB)
|
||||
install(FILES $<TARGET_PDB_FILE:${Launcher_Name}_updater> DESTINATION ${BINARY_DEST_DIR} OPTIONAL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -1506,8 +1506,8 @@ if(WIN32 OR (DEFINED Launcher_BUILD_FILELINKER AND Launcher_BUILD_FILELINKER))
|
|||
)
|
||||
|
||||
# Deploy PDBs
|
||||
if(WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
|
||||
install(FILES $<TARGET_PDB_FILE:${Launcher_Name}_filelink> DESTINATION ${BINARY_DEST_DIR})
|
||||
if(CMAKE_CXX_LINKER_SUPPORTS_PDB)
|
||||
install(FILES $<TARGET_PDB_FILE:${Launcher_Name}_filelink> DESTINATION ${BINARY_DEST_DIR} OPTIONAL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue