1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-09-28 12:47:35 +00:00

CMake: Minor debug refactoring

- LAIKA_DEBUG_BUILD is set to true if lower(CMAKE_BUILD_TYPE) matches 'debug'
This commit is contained in:
2022-06-05 15:51:18 -05:00
parent a410a9ac15
commit 87f5eaa694
2 changed files with 4 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ file(GLOB_RECURSE BOTHEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/**.h)
# include platform specific backends
if(WIN32)
file(GLOB_RECURSE BOTPLATFORMSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/win/**.c)
if (NOT RAWCMAKEBUILDTYPE STREQUAL "debug")
if (NOT LAIKA_DEBUG_BUILD)
set(BOTFLAGS WIN32)
endif ()
elseif(UNIX AND NOT APPLE)
@@ -37,7 +37,7 @@ target_compile_definitions(LaikaBot PUBLIC "$<$<CONFIG:Debug>:DEBUG>")
target_include_directories(LaikaBot PUBLIC ${BOT_INCLUDEDIR})
# strip symbols for UNIX binaries
if((UNIX AND NOT APPLE) AND NOT RAWCMAKEBUILDTYPE STREQUAL "debug")
if((UNIX AND NOT APPLE) AND NOT LAIKA_DEBUG_BUILD)
message(STATUS "Stripping LaikaBot symbols...")
target_link_options(LaikaBot PRIVATE -s)
endif ()