summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Akulich <akulichalexander@gmail.com>2016-01-16 01:31:59 +0500
committerAlexandr Akulich <akulichalexander@gmail.com>2016-01-16 01:31:59 +0500
commit5eeddedd04c9a4d18c92b4eb5aa494d7abc9a1d5 (patch)
treeab2be28170f60a20f2ae3b29aed4caad4ef5e25d
parent7389dc990c67d4269f3a79c924c054e87f2e4ac5 (diff)
CMakeLists: Made tp-service to be a shared (optionally) library.
-rw-r--r--CMakeLists.txt2
-rw-r--r--TelepathyQt/CMakeLists.txt10
2 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a01b586f..3716f127 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 1b32d32b..3217afdd 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