Permalink
Browse files

CMake: Use CMakePackageConfigHelpers to generate the package config

Now we also generate a QXmppConfigVersion.cmake file.
  • Loading branch information...
olesalscheider authored and jlaine committed Sep 6, 2018
1 parent 34b6a75 commit f97336f3796ffba53a7c5d4a8adc58092752970a
Showing with 20 additions and 4 deletions.
  1. +16 −1 CMakeLists.txt
  2. +0 −3 QXmppConfig.cmake
  3. +4 −0 QXmppConfig.cmake.in
View
@@ -37,8 +37,23 @@ if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
include(CMakePackageConfigHelpers)
configure_package_config_file(
QXmppConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/QXmppConfig.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/qxmpp"
)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/QXmppConfigVersion.cmake
VERSION ${VERSION_STRING}
COMPATIBILITY SameMajorVersion
)
install(
FILES QXmppConfig.cmake
FILES ${CMAKE_CURRENT_BINARY_DIR}/QXmppConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/QXmppConfigVersion.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/qxmpp"
COMPONENT Devel
)
View

This file was deleted.

Oops, something went wrong.
View
@@ -0,0 +1,4 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/QXmpp.cmake")
check_required_components(QXmpp)

0 comments on commit f97336f

Please sign in to comment.