43 lines
1.0 KiB
CMake
43 lines
1.0 KiB
CMake
cmake_minimum_required(VERSION 3.31)
|
|
project(Destrum)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
if (MSVC)
|
|
# Disable Just My Code debugging
|
|
add_compile_options(/JMC-)
|
|
endif()
|
|
|
|
add_subdirectory(destrum)
|
|
add_subdirectory(lightkeeper)
|
|
add_subdirectory(TheChef)
|
|
|
|
add_custom_target(CleanupAssets)
|
|
add_dependencies(CleanupAssets
|
|
_internal_clean_game_assets
|
|
_internal_clean_engine_assets
|
|
)
|
|
|
|
add_custom_target(CookAssets)
|
|
add_dependencies(CookAssets
|
|
_internal_cook_game_assets
|
|
_internal_cook_engine_assets
|
|
)
|
|
|
|
option(ENABLE_SANITIZERS "Enable Address/Undefined sanitizers" OFF)
|
|
|
|
if (ENABLE_SANITIZERS AND CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
|
|
foreach(target destrum lightkeeper)
|
|
target_compile_options(${target} PRIVATE
|
|
-fsanitize=address,undefined
|
|
-fno-omit-frame-pointer
|
|
-fno-stack-protector
|
|
-g3
|
|
)
|
|
|
|
target_link_options(${target} PRIVATE
|
|
-fsanitize=address,undefined
|
|
)
|
|
endforeach()
|
|
endif()
|