telepathy-qt: CMakeLists: Made tp-service to be a shared (optionally) library.

Alexandr Akulich kaffeine at kemper.freedesktop.org
Sat Apr 23 08:33:21 UTC 2016


Module: telepathy-qt
Branch: master
Commit: 5eeddedd04c9a4d18c92b4eb5aa494d7abc9a1d5
URL:    http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=5eeddedd04c9a4d18c92b4eb5aa494d7abc9a1d5

Author: Alexandr Akulich <akulichalexander at gmail.com>
Date:   Sat Jan 16 01:31:59 2016 +0500

CMakeLists: Made tp-service to be a shared (optionally) library.

---

 CMakeLists.txt             |  2 ++
 TelepathyQt/CMakeLists.txt | 10 ++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a01b586..3716f12 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,8 @@ endif (${TP_QT_NANO_VERSION} EQUAL 0)
 
 # Add an option for compiling tp-qt-service
 option(ENABLE_SERVICE_SUPPORT "Enable compilation of service side bindings for Telepathy-Qt" TRUE)
+# Add an option to select type of service library
+option(FORCE_STATIC_SERVICE_LIBRARY "Force Telepathy-Qt service to be a static library." FALSE)
 # Add an option for compiling examples
 option(ENABLE_EXAMPLES "Enable compilation of examples for Telepathy-Qt" TRUE)
 # Add an option for compiling Farstream
diff --git a/TelepathyQt/CMakeLists.txt b/TelepathyQt/CMakeLists.txt
index 1b32d32..3217afd 100644
--- a/TelepathyQt/CMakeLists.txt
+++ b/TelepathyQt/CMakeLists.txt
@@ -951,8 +951,14 @@ if(ENABLE_SERVICE_SUPPORT)
     #else (ENABLE_COMPILER_COVERAGE)
     #    add_library(telepathy-qt${QT_VERSION_MAJOR}-service SHARED ${telepathy_qt_service_SRCS})
     #endif (ENABLE_COMPILER_COVERAGE)
-    # lets build a static only library until we have a stable API/ABI
-    add_library(telepathy-qt${QT_VERSION_MAJOR}-service STATIC ${telepathy_qt_service_SRCS})
+
+    if(FORCE_STATIC_SERVICE_LIBRARY)
+        set(SERVICE_LIBRARY_TYPE STATIC)
+    else(FORCE_STATIC_SERVICE_LIBRARY)
+        set(SERVICE_LIBRARY_TYPE SHARED)
+    endif(FORCE_STATIC_SERVICE_LIBRARY)
+
+    add_library(telepathy-qt${QT_VERSION_MAJOR}-service ${SERVICE_LIBRARY_TYPE} ${telepathy_qt_service_SRCS})
     add_dependencies(telepathy-qt${QT_VERSION_MAJOR}-service stable-typesgen future-typesgen)
 
     # generate service moc files



More information about the telepathy-commits mailing list