Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert <krzmbrzl@gmail.com>2020-09-26 10:14:39 +0300
committerRobert <krzmbrzl@gmail.com>2020-09-26 10:14:39 +0300
commita25e224122ffcdcdd2988004839a163b42352db0 (patch)
tree73d9fb3816a2efe40ed22805f9c1085acca77ed1 /plugins
parent69dfdd2135f7fd6fadd662d77bc4e712a91fd275 (diff)
BUILD(cmake): Don't build retracted plugins by default
As these plugins typically don't do anything anymore it doesn't make all that much sense to include them by default. If you still want to include retracted plugins, use -Dretracted-plugins=ON when invoking cmake.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CMakeLists.txt16
-rw-r--r--plugins/css/CMakeLists.txt7
-rw-r--r--plugins/dods/CMakeLists.txt7
-rw-r--r--plugins/hl2dm/CMakeLists.txt7
-rw-r--r--plugins/sto/CMakeLists.txt7
-rw-r--r--plugins/tf2/CMakeLists.txt7
6 files changed, 41 insertions, 10 deletions
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
index 223f63c72..905cda5b4 100644
--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -3,6 +3,12 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
+option(retracted-plugins "Build redacted (outdated) plugins as well" OFF)
+
+if(retracted-plugins)
+ message(STATUS "Including retracted plugins")
+endif()
+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if(NOT WIN32 AND NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
@@ -18,8 +24,18 @@ file(GLOB ITEMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR
foreach(ITEM ${ITEMS})
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
+ set(PLUGIN_RETRACTED OFF)
+
+ # If the plugin is retracted the corresponding CMakeLists.txt is supposed to set the
+ # PLUGIN_RETRACTED variable in the parent scope so that we can access it here
add_subdirectory(${ITEM})
+ if(PLUGIN_RETRACTED AND NOT retracted-plugins)
+ # The included subdir didn't actually add a target since the associated plugin is retracted
+ # and therefore it should not be built.
+ continue()
+ endif()
+
if(WIN32)
target_link_libraries(${ITEM} user32.lib)
diff --git a/plugins/css/CMakeLists.txt b/plugins/css/CMakeLists.txt
index cad1c457f..0437fa657 100644
--- a/plugins/css/CMakeLists.txt
+++ b/plugins/css/CMakeLists.txt
@@ -3,6 +3,9 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
-add_library(css SHARED "../null_plugin.cpp")
+set(PLUGIN_RETRACTED ON PARENT_SCOPE)
+if(retracted-plugins)
+ add_library(css SHARED "../null_plugin.cpp")
-target_compile_definitions(css PRIVATE "NULL_DESC=L\"Counter Strike: Source (retracted, now using Link)\"")
+ target_compile_definitions(css PRIVATE "NULL_DESC=L\"Counter Strike: Source (retracted, now using Link)\"")
+endif()
diff --git a/plugins/dods/CMakeLists.txt b/plugins/dods/CMakeLists.txt
index bb0257ecc..cc990ef01 100644
--- a/plugins/dods/CMakeLists.txt
+++ b/plugins/dods/CMakeLists.txt
@@ -3,6 +3,9 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
-add_library(dods SHARED "../null_plugin.cpp")
+set(PLUGIN_RETRACTED ON PARENT_SCOPE)
+if(retracted-plugins)
+ add_library(dods SHARED "../null_plugin.cpp")
-target_compile_definitions(dods PRIVATE "NULL_DESC=L\"Day of Defeat: Source (retracted, now using Link)\"")
+ target_compile_definitions(dods PRIVATE "NULL_DESC=L\"Day of Defeat: Source (retracted, now using Link)\"")
+endif()
diff --git a/plugins/hl2dm/CMakeLists.txt b/plugins/hl2dm/CMakeLists.txt
index f79b36f53..6fa789b59 100644
--- a/plugins/hl2dm/CMakeLists.txt
+++ b/plugins/hl2dm/CMakeLists.txt
@@ -3,6 +3,9 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
-add_library(hl2dm SHARED "../null_plugin.cpp")
+set(PLUGIN_RETRACTED ON PARENT_SCOPE)
+if(retracted-plugins)
+ add_library(hl2dm SHARED "../null_plugin.cpp")
-target_compile_definitions(hl2dm PRIVATE "NULL_DESC=L\"Half-Life 2: Deathmatch (retracted, now using Link)\"")
+ target_compile_definitions(hl2dm PRIVATE "NULL_DESC=L\"Half-Life 2: Deathmatch (retracted, now using Link)\"")
+endif()
diff --git a/plugins/sto/CMakeLists.txt b/plugins/sto/CMakeLists.txt
index ea1ebb36c..64817d5ad 100644
--- a/plugins/sto/CMakeLists.txt
+++ b/plugins/sto/CMakeLists.txt
@@ -3,6 +3,9 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
-add_library(sto SHARED "../null_plugin.cpp")
+set(PLUGIN_RETRACTED ON PARENT_SCOPE)
+if(retracted-plugins)
+ add_library(sto SHARED "../null_plugin.cpp")
-target_compile_definitions(sto PRIVATE "NULL_DESC=L\"Star Trek Online (retracted due to lack of maintenance)\"")
+ target_compile_definitions(sto PRIVATE "NULL_DESC=L\"Star Trek Online (retracted due to lack of maintenance)\"")
+endif()
diff --git a/plugins/tf2/CMakeLists.txt b/plugins/tf2/CMakeLists.txt
index fccb367d2..1880c2ee5 100644
--- a/plugins/tf2/CMakeLists.txt
+++ b/plugins/tf2/CMakeLists.txt
@@ -3,6 +3,9 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
-add_library(tf2 SHARED "../null_plugin.cpp")
+set(PLUGIN_RETRACTED ON PARENT_SCOPE)
+if(retracted-plugins)
+ add_library(tf2 SHARED "../null_plugin.cpp")
-target_compile_definitions(tf2 PRIVATE "NULL_DESC=L\"Team Fortress 2 (retracted, now using Link)\"")
+ target_compile_definitions(tf2 PRIVATE "NULL_DESC=L\"Team Fortress 2 (retracted, now using Link)\"")
+endif()