r5sdk/r5dev/cmake/Configure.cmake
Kawe Mazidjatari 3f8baf6f68 Allow setting compile options for specific targets
Previously, it was all controlled from the global init (applied to all projects), but some projects need different options. With these changes, you can disable the common options applied in the 'add_module' macro, and set your own if desired.
2023-06-17 00:45:27 +02:00

24 lines
1.0 KiB
CMake

# -----------------------------------------------------------------------------
# Initial setup for build system
# -----------------------------------------------------------------------------
macro( initial_setup )
set( CMAKE_CXX_STANDARD 17 )
set( CMAKE_CXX_STANDARD_REQUIRED True )
set( ENGINE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/r5dev" CACHE PATH "Engine source directory" )
set( THIRDPARTY_SOURCE_DIR "${ENGINE_SOURCE_DIR}/thirdparty" CACHE PATH "Thirdparty source directory" )
set( GLOBAL_PCH
"${ENGINE_SOURCE_DIR}/core/stdafx.h"
) # Global precompiled header shared among all libraries
set_property( GLOBAL PROPERTY USE_FOLDERS ON ) # Use filters
endmacro()
# -----------------------------------------------------------------------------
# Set global configuration types
# -----------------------------------------------------------------------------
macro( setup_build_configurations )
set( CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" CACHE STRING "" FORCE )
endmacro()