Commit 1e8102b5 authored by Volker Krause's avatar Volker Krause
Browse files

Move to KPim namespace as requested during review

parent 2f8dbaa0
......@@ -18,7 +18,7 @@ include(GenerateExportHeader)
set(CMAKE_AUTOMOC ON)
ecm_setup_version(PROJECT VARIABLE_PREFIX KPKPASS
VERSION_HEADER kpkpass_version.h
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPkPassConfigVersion.cmake"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPimPkPassConfigVersion.cmake"
)
find_package(Qt5 REQUIRED COMPONENTS Test Gui)
......@@ -31,22 +31,23 @@ add_subdirectory(autotests)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KPkPass")
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KPimPkPass")
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KPkPassConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KPkPassConfig.cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/KPimPkPassConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KPimPkPassConfig.cmake"
INSTALL_DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KPkPassConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KPkPassConfigVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KPimPkPassConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KPimPkPassConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel)
install(EXPORT KPkPassTargets
install(EXPORT KPimPkPassTargets
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
FILE KPkPassTargets.cmake
FILE KPimPkPassTargets.cmake
NAMESPACE KPim::
)
install(FILES org_kde_kpkpass.categories DESTINATION ${KDE_INSTALL_CONFDIR})
......@@ -2,5 +2,5 @@
find_package(Qt5 @Qt5Core_VERSION_MAJOR@.@Qt5Core_VERSION_MINOR@ NO_MODULE REQUIRED COMPONENTS Core Gui)
include("${CMAKE_CURRENT_LIST_DIR}/KPkPassTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/KPimPkPassTargets.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@
add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
ecm_add_test(pkpasstest.cpp LINK_LIBRARIES Qt5::Test KPkPass)
ecm_add_test(pkpasstest.cpp LINK_LIBRARIES Qt5::Test KPim::PkPass)
......@@ -12,9 +12,9 @@ portingAid: false
deprecated: false
release: true
libraries:
- qmake: KPkPass
cmake: KPkPass
cmakename: KPkPass
- qmake: KPimPkPass
cmake: "KPim::PkPass"
cmakename: KPimPkPass
public_lib: true
group: kdepim
set(KDE_INSTALL_INCLUDEDIR_PIM ${KDE_INSTALL_INCLUDEDIR}/KPim)
set(pkpass_srcs
barcode.cpp
boardingpass.cpp
......@@ -11,15 +12,16 @@ ecm_qt_declare_logging_category(pkpass_srcs
CATEGORY_NAME org.kde.pkpass
)
add_library(KPkPass SHARED ${pkpass_srcs})
generate_export_header(KPkPass BASE_NAME KPkPass)
set_target_properties(KPkPass PROPERTIES
add_library(KPimPkPass SHARED ${pkpass_srcs})
add_library(KPim::PkPass ALIAS KPimPkPass)
generate_export_header(KPimPkPass BASE_NAME KPkPass)
set_target_properties(KPimPkPass PROPERTIES
VERSION ${KPKPASS_VERSION_STRING}
SOVERSION ${KPKPASS_SOVERSION}
EXPORT_NAME KPkPass
EXPORT_NAME PkPass
)
target_include_directories(KPkPass INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}>")
target_link_libraries(KPkPass
target_include_directories(KPimPkPass INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_PIM}>")
target_link_libraries(KPimPkPass
PUBLIC
Qt5::Gui
PRIVATE
......@@ -36,11 +38,11 @@ ecm_generate_headers(KPkPass_HEADERS
REQUIRED_HEADERS KPkPass_HEADERS
)
install(TARGETS KPkPass EXPORT KPkPassTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS KPimPkPass EXPORT KPimPkPassTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES
${KPkPass_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/kpkpass_export.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KPkPass
DESTINATION ${KDE_INSTALL_INCLUDEDIR_PIM}/KPkPass
)
if (NOT ANDROID)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment