aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>2018-06-17 18:22:30 +0200
committerNiels Ole Salscheider <niels_ole@salscheider-online.de>2018-06-17 18:22:30 +0200
commit31f0a42073b68823e85835ec3e25114d79705a04 (patch)
treee8215baa3ebd19884754ccf65ca21ca10ebbe24d /src
parent39fe288bcbbe12ba3ec8d494def76cfddb65fc0d (diff)
downloadqxmpp-31f0a42073b68823e85835ec3e25114d79705a04.tar.gz
CMake: Make the library properly importable
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9acdfbaf..628c0ae5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -193,7 +193,15 @@ set_target_properties(qxmpp PROPERTIES
VERSION ${VERSION_STRING}
SOVERSION ${SO_VERSION}
EXPORT_NAME QXmpp
- INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_INSTALL_FULL_INCLUDEDIR}/qxmpp"
+)
+
+target_include_directories(qxmpp
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/base>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/client>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/server>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/base>
+ $<INSTALL_INTERFACE:include/qmake>
)
target_link_libraries(qxmpp
@@ -219,6 +227,11 @@ install(
COMPONENT Devel
)
+export(
+ TARGETS qxmpp
+ FILE QXmpp.cmake
+)
+
install(
FILES ${INSTALL_HEADER_FILES}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qxmpp"