summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson.kde@gmail.com>2015-07-18 15:28:05 (GMT)
committerAlex Richardson <arichardson.kde@gmail.com>2015-07-20 13:17:38 (GMT)
commited352a06fb918f778e022e6c17d919921f204707 (patch)
treed2fd24e898b2b0754132cbd68d25083499f1eb91
parentc2fc0199b8f7cf1f0a4bfee0568fa68ec8d1d6ab (diff)
Install Okular5Config.cmake instead of OkularConfig.cmake
Otherwise Qt4 projects that have a find_package(Okular) can break because CMake then selects moc from Qt5 which won't work REVIEW: 124381
-rw-r--r--CMakeLists.txt16
-rw-r--r--Okular5Config.cmake.in (renamed from OkularConfig.cmake.in)2
2 files changed, 9 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b882f3..b2a7552 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,7 @@ include(ECMPackageConfigHelpers)
ecm_setup_version(1.0.0 VARIABLE_PREFIX OKULAR
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/core/version.h"
- PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/OkularConfigVersion.cmake")
+ PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/Okular5ConfigVersion.cmake")
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Test Widgets PrintSupport Svg Qml Quick)
find_package(Qt5 ${QT_REQUIRED_VERSION} OPTIONAL_COMPONENTS TextToSpeech)
@@ -218,7 +218,7 @@ endif(LibKScreen_FOUND)
set_target_properties(okularcore PROPERTIES VERSION 6.0.0 SOVERSION 6 )
-install(TARGETS okularcore EXPORT OkularTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS okularcore EXPORT Okular5Targets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES conf/okular.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(FILES conf/okular_core.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
@@ -315,22 +315,22 @@ install( FILES part.rc part-viewermode.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}
########### cmake files #################
-set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Okular")
+set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Okular5")
ecm_configure_package_config_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/OkularConfig.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/OkularConfig.cmake"
+ "${CMAKE_CURRENT_SOURCE_DIR}/Okular5Config.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Okular5Config.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
PATH_VARS INCLUDE_INSTALL_DIR CMAKE_INSTALL_PREFIX
)
install(FILES
- "${CMAKE_CURRENT_BINARY_DIR}/OkularConfig.cmake"
- "${CMAKE_CURRENT_BINARY_DIR}/OkularConfigVersion.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/Okular5Config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/Okular5ConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
-install(EXPORT OkularTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE OkularTargets.cmake NAMESPACE Okular:: )
+install(EXPORT Okular5Targets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE Okular5Targets.cmake NAMESPACE Okular::)
########### summary #################
diff --git a/OkularConfig.cmake.in b/Okular5Config.cmake.in
index 2b610fe..a784229 100644
--- a/OkularConfig.cmake.in
+++ b/Okular5Config.cmake.in
@@ -7,4 +7,4 @@ find_dependency(KF5CoreAddons @KF5_REQUIRED_VERSION@)
find_dependency(KF5Config @KF5_REQUIRED_VERSION@)
find_dependency(KF5XmlGui @KF5_REQUIRED_VERSION@)
-include("${CMAKE_CURRENT_LIST_DIR}/OkularTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/Okular5Targets.cmake")