telepathy-qt: CMake: Move the CMake targets into namespace
Alexandr Akulich
kaffeine at kemper.freedesktop.org
Mon Nov 11 17:28:14 UTC 2019
Module: telepathy-qt
Branch: master
Commit: 0f43425a4d961c860f8207c679b5b200cde9b0b1
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=0f43425a4d961c860f8207c679b5b200cde9b0b1
Author: Alexander Akulich <akulichalexander at gmail.com>
Date: Thu Nov 7 02:52:54 2019 +0300
CMake: Move the CMake targets into namespace
---
TelepathyQt/CMakeLists.txt | 6 ++++++
TelepathyQt/Farstream/CMakeLists.txt | 2 ++
2 files changed, 8 insertions(+)
diff --git a/TelepathyQt/CMakeLists.txt b/TelepathyQt/CMakeLists.txt
index 18d07980..d742d31e 100644
--- a/TelepathyQt/CMakeLists.txt
+++ b/TelepathyQt/CMakeLists.txt
@@ -748,6 +748,7 @@ if (ENABLE_COMPILER_COVERAGE)
else ()
add_library(telepathy-qt${QT_VERSION_MAJOR} SHARED ${telepathy_qt_SRCS})
endif ()
+add_library(TelepathyQt${QT_VERSION_MAJOR}::Core ALIAS telepathy-qt${QT_VERSION_MAJOR})
# We are building Telepathy-Qt
target_compile_definitions(telepathy-qt${QT_VERSION_MAJOR} PRIVATE BUILDING_TP_QT)
@@ -802,6 +803,7 @@ endif ()
# Set the correct version number
set_target_properties(telepathy-qt${QT_VERSION_MAJOR} PROPERTIES
+ EXPORT_NAME Core
SOVERSION ${TP_QT_ABI_VERSION}
VERSION ${TP_QT_LIBRARY_VERSION})
@@ -843,7 +845,9 @@ write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/TelepathyQt${QT_VER
install(EXPORT TelepathyQt${QT_VERSION_MAJOR}Targets
DESTINATION ${_TelepathyQtConfig_INSTALL_DIR}
+ NAMESPACE TelepathyQt${QT_VERSION_MAJOR}::
COMPONENT headers)
+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/TelepathyQt${QT_VERSION_MAJOR}ConfigVersion.cmake
${CMAKE_CURRENT_BINARY_DIR}/TelepathyQt${QT_VERSION_MAJOR}Config.cmake
DESTINATION ${_TelepathyQtConfig_INSTALL_DIR}
@@ -969,6 +973,7 @@ if(ENABLE_SERVICE_SUPPORT)
endif()
add_library(telepathy-qt${QT_VERSION_MAJOR}-service ${SERVICE_LIBRARY_TYPE} ${telepathy_qt_service_SRCS})
+ add_library(TelepathyQt${QT_VERSION_MAJOR}::Service ALIAS telepathy-qt${QT_VERSION_MAJOR}-service)
add_dependencies(telepathy-qt${QT_VERSION_MAJOR}-service stable-typesgen future-typesgen)
# generate service moc files
@@ -991,6 +996,7 @@ if(ENABLE_SERVICE_SUPPORT)
# Set the correct version number
set_target_properties(telepathy-qt${QT_VERSION_MAJOR}-service PROPERTIES
+ EXPORT_NAME Service
SOVERSION ${TP_QT_SERVICE_ABI_VERSION}
VERSION ${TP_QT_LIBRARY_VERSION})
diff --git a/TelepathyQt/Farstream/CMakeLists.txt b/TelepathyQt/Farstream/CMakeLists.txt
index fe542967..18300fee 100644
--- a/TelepathyQt/Farstream/CMakeLists.txt
+++ b/TelepathyQt/Farstream/CMakeLists.txt
@@ -31,6 +31,7 @@ if(FARSTREAM_COMPONENTS_FOUND)
add_library(telepathy-qt${QT_VERSION_MAJOR}-farstream SHARED
${telepathy_qt_farstream_SRCS} ${telepathy_qt_farstream_MOC_SRCS})
endif ()
+ add_library(TelepathyQt${QT_VERSION_MAJOR}::Farstream ALIAS telepathy-qt${QT_VERSION_MAJOR}-farstream)
# We are building Telepathy-Qt-Farstream
target_compile_definitions(telepathy-qt${QT_VERSION_MAJOR}-farstream PRIVATE
@@ -54,6 +55,7 @@ if(FARSTREAM_COMPONENTS_FOUND)
# Set the correct version number
set_target_properties(telepathy-qt${QT_VERSION_MAJOR}-farstream PROPERTIES
+ EXPORT_NAME Farstream
SOVERSION ${TP_QT_ABI_VERSION}
VERSION ${TP_QT_LIBRARY_VERSION})
More information about the telepathy-commits
mailing list