mirror of https://github.com/OpenRCT2/OpenRCT2.git
Allow building headless version as a separate target
This commit is contained in:
parent
a43ee2b987
commit
de9adf5445
|
@ -10,7 +10,6 @@ set(TITLE_SEQUENCE_URL "https://github.com/OpenRCT2/title-sequences/releases/do
|
|||
set(TITLE_SEQUENCE_SHA1 "79ffb2585d12abcbfce205d7696e3472a504b005")
|
||||
|
||||
option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.")
|
||||
option(CLI_ONLY "CLI only build of OpenRCT2")
|
||||
option(WITH_TESTS "Build tests")
|
||||
|
||||
# Define current git branch
|
||||
|
@ -49,11 +48,8 @@ endif()
|
|||
|
||||
# Include sub-projects
|
||||
include("${ROOT_DIR}/src/openrct2/CMakeLists.txt" NO_POLICY_SCOPE)
|
||||
if (CLI_ONLY)
|
||||
include("${ROOT_DIR}/src/openrct2-cli/CMakeLists.txt" NO_POLICY_SCOPE)
|
||||
else ()
|
||||
include("${ROOT_DIR}/src/openrct2-ui/CMakeLists.txt" NO_POLICY_SCOPE)
|
||||
endif ()
|
||||
include("${ROOT_DIR}/src/openrct2-cli/CMakeLists.txt" NO_POLICY_SCOPE)
|
||||
include("${ROOT_DIR}/src/openrct2-ui/CMakeLists.txt" NO_POLICY_SCOPE)
|
||||
|
||||
# g2
|
||||
add_custom_command(
|
||||
|
|
|
@ -18,9 +18,9 @@ file(GLOB_RECURSE OPENRCT2_CLI_SOURCES
|
|||
"${CMAKE_CURRENT_LIST_DIR}/*.hpp")
|
||||
|
||||
# Outputs
|
||||
set (PROJECT openrct2)
|
||||
set (PROJECT openrct2-cli)
|
||||
project(${PROJECT})
|
||||
add_executable(${PROJECT} ${OPENRCT2_CLI_SOURCES})
|
||||
add_executable(${PROJECT} EXCLUDE_FROM_ALL ${OPENRCT2_CLI_SOURCES})
|
||||
|
||||
target_link_libraries(${PROJECT} "libopenrct2")
|
||||
|
||||
|
|
Loading…
Reference in New Issue