mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-23 05:51:58 +00:00
Merge branch 'cmake-develop-flag' into 'master'
Add cmake config option to compile a dev build See merge request KartKrew/Kart!460
This commit is contained in:
commit
031a1105ff
2 changed files with 9 additions and 2 deletions
|
|
@ -118,8 +118,9 @@ set(SRB2_SDL2_EXE_NAME srb2kart CACHE STRING "Executable binary output name")
|
|||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(assets)
|
||||
|
||||
if(NOT ${SRB2_CONFIG_DEV_BUILD})
|
||||
add_subdirectory(assets)
|
||||
endif()
|
||||
|
||||
## config.h generation
|
||||
set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ set(SRB2_CONFIG_YASM OFF CACHE BOOL
|
|||
"Use YASM in place of NASM.")
|
||||
set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL
|
||||
"Use statically linked OpenGL. NOT RECOMMENDED.")
|
||||
set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL
|
||||
"Compile a development build of SRB2Kart.")
|
||||
|
||||
### use internal libraries?
|
||||
if(${CMAKE_SYSTEM} MATCHES "Windows") ###set on Windows only
|
||||
|
|
@ -280,6 +282,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-absolute-value)
|
||||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_DEV_BUILD})
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DDEVELOP)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-trigraphs)
|
||||
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DCMAKECONFIG)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue