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:
authorDavide Beatrici <git@davidebeatrici.dev>2020-05-26 02:12:27 +0300
committerDavide Beatrici <git@davidebeatrici.dev>2020-07-11 20:34:49 +0300
commit6b87ac6221b475b65df4d1cd1cbc680c5a18db1c (patch)
treea65947281d80d74107fc6bac788e23a0501fec2b /plugins/CMakeLists.txt
parentabc04159f5d27547e55372bcbf1d547ecdc3fe99 (diff)
Plugins: add CMakeLists.txt files
Diffstat (limited to 'plugins/CMakeLists.txt')
-rw-r--r--plugins/CMakeLists.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
new file mode 100644
index 000000000..b61471e8e
--- /dev/null
+++ b/plugins/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Copyright 2019-2020 The Mumble Developers. All rights reserved.
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file at the root of the
+# Mumble source tree or at <https://www.mumble.info/LICENSE>.
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+if(NOT WIN32 AND NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
+ add_subdirectory(link)
+
+ # Shared library on UNIX (e.g. ".so")
+ set_target_properties(link PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
+
+ return()
+endif()
+
+file(GLOB ITEMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*")
+
+foreach(ITEM ${ITEMS})
+ if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
+ add_subdirectory(${ITEM})
+
+ if(WIN32)
+ target_link_libraries(${ITEM} user32.lib)
+
+ # Shared library on Windows (e.g. ".dll")
+ set_target_properties(${ITEM} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
+ else()
+ # Shared library on UNIX (e.g. ".so")
+ set_target_properties(${ITEM} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
+ endif()
+ endif()
+endforeach()