From 129aebab2afd4c7e952809e06d0ca218f279e639 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Wed, 27 Mar 2024 16:49:19 +0200 Subject: [PATCH] Client compilation is now optional --- CMakeLists.txt | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78122eb06..43244270b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,7 @@ endif() # Platform-independent options +option(ENABLE_CLIENT "Enable compilation of game client" ON) option(ENABLE_ERM "Enable compilation of ERM scripting module" OFF) option(ENABLE_LUA "Enable compilation of LUA scripting module" OFF) option(ENABLE_TRANSLATIONS "Enable generation of translations for launcher and editor" ON) @@ -493,7 +494,7 @@ if(ENABLE_LAUNCHER OR ENABLE_EDITOR) endif() endif() -if(ENABLE_NULLKILLER_AI) +if(ENABLE_NULLKILLER_AI AND ENABLE_CLIENT) find_package(TBB REQUIRED) endif() @@ -603,10 +604,15 @@ if(APPLE_IOS) add_subdirectory(ios) endif() -add_subdirectory_with_folder("AI" AI) +if (ENABLE_CLIENT) + add_subdirectory_with_folder("AI" AI) +endif() add_subdirectory(lib) -add_subdirectory(server) + +if (ENABLE_CLIENT OR ENABLE_SERVER) + add_subdirectory(server) +endif() if(ENABLE_ERM) add_subdirectory(scripting/erm) @@ -633,7 +639,9 @@ if(ENABLE_LOBBY) add_subdirectory(lobby) endif() -add_subdirectory(client) +if (ENABLE_CLIENT) + add_subdirectory(client) +endif() if(ENABLE_SERVER) add_subdirectory(serverapp) @@ -677,7 +685,9 @@ if(ANDROID) ") else() install(DIRECTORY config DESTINATION ${DATA_DIR}) - install(DIRECTORY Mods DESTINATION ${DATA_DIR}) + if (ENABLE_CLIENT OR ENABLE_SERVER) + install(DIRECTORY Mods DESTINATION ${DATA_DIR}) + endif() endif() if(ENABLE_LUA) install(DIRECTORY scripts DESTINATION ${DATA_DIR})