summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2020-12-13 00:24:55 +0100
committerglx22 <glx22@users.noreply.github.com>2020-12-13 22:46:46 +0100
commitd1fa6b129c94b7c4ae6e45184a25962d49d074b8 (patch)
tree82d1204f72c997e16ee6385914e49c05a2e2e16a /src
parentb7851e51adf0fb0d39ed34a579cf6fe68d8949be (diff)
downloadopenttd-d1fa6b129c94b7c4ae6e45184a25962d49d074b8.tar.xz
Add: [CMake] Option to only build tools/docs
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt11
-rw-r--r--src/script/CMakeLists.txt4
-rw-r--r--src/script/api/CMakeLists.txt4
-rw-r--r--src/strgen/CMakeLists.txt4
4 files changed, 20 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0a0ac406a..bbe66b764 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,3 +1,11 @@
+add_subdirectory(script)
+add_subdirectory(settingsgen)
+add_subdirectory(strgen)
+
+if(OPTION_TOOLS_ONLY)
+ return()
+endif()
+
add_subdirectory(3rdparty)
add_subdirectory(ai)
add_subdirectory(blitter)
@@ -11,11 +19,8 @@ add_subdirectory(network)
add_subdirectory(os)
add_subdirectory(pathfinder)
add_subdirectory(saveload)
-add_subdirectory(script)
-add_subdirectory(settingsgen)
add_subdirectory(sound)
add_subdirectory(spriteloader)
-add_subdirectory(strgen)
add_subdirectory(table)
add_subdirectory(video)
add_subdirectory(widgets)
diff --git a/src/script/CMakeLists.txt b/src/script/CMakeLists.txt
index e5915332c..f4b87dc3b 100644
--- a/src/script/CMakeLists.txt
+++ b/src/script/CMakeLists.txt
@@ -1,5 +1,9 @@
add_subdirectory(api)
+if(OPTION_TOOLS_ONLY)
+ return()
+endif()
+
add_files(
script_config.cpp
script_config.hpp
diff --git a/src/script/api/CMakeLists.txt b/src/script/api/CMakeLists.txt
index 9bc4183f1..c21707d43 100644
--- a/src/script/api/CMakeLists.txt
+++ b/src/script/api/CMakeLists.txt
@@ -131,6 +131,10 @@ foreach(API "ai;AI" "game;GS" "template;Template")
)
endforeach()
+if(OPTION_TOOLS_ONLY)
+ return()
+endif()
+
add_library(openttd::script_api ALIAS script_api)
diff --git a/src/strgen/CMakeLists.txt b/src/strgen/CMakeLists.txt
index c638b5c6e..08c122335 100644
--- a/src/strgen/CMakeLists.txt
+++ b/src/strgen/CMakeLists.txt
@@ -22,6 +22,10 @@ if (NOT HOST_BINARY_DIR)
add_dependencies(tools strgen)
endif()
+if(OPTION_TOOLS_ONLY)
+ return()
+endif()
+
# Source Files
add_files(strgen_base.cpp)