CMakeLists.txt 1.55 KB
Newer Older
1
cmake_minimum_required(VERSION 3.0)
2
project(KPkPass VERSION 0.0.1)
3
4

find_package(ECM 5.38 REQUIRED NO_MODULE)
5
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
6

Volker Krause's avatar
Volker Krause committed
7
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
8
9
10
11
12
13
14
15
16
17
include(ECMAddTests)
include(ECMGenerateHeaders)
include(ECMQtDeclareLoggingCategory)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(GenerateExportHeader)

set(CMAKE_AUTOMOC ON)
18
19
ecm_setup_version(PROJECT VARIABLE_PREFIX KPKPASS
    VERSION_HEADER kpkpass_version.h
Volker Krause's avatar
Volker Krause committed
20
21
    PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPkPassConfigVersion.cmake"
)
22
23
24

find_package(Qt5 REQUIRED COMPONENTS Test Gui)
find_package(KF5 REQUIRED COMPONENTS Archive)
25
find_package(SharedMimeInfo 1.3 REQUIRED)
26
27
28
29
30

add_subdirectory(src)
add_subdirectory(autotests)

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
Volker Krause's avatar
Volker Krause committed
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50


set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KPkPass")

configure_package_config_file(
    "${CMAKE_CURRENT_SOURCE_DIR}/KPkPassConfig.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/KPkPassConfig.cmake"
    INSTALL_DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
)

install(FILES
        "${CMAKE_CURRENT_BINARY_DIR}/KPkPassConfig.cmake"
        "${CMAKE_CURRENT_BINARY_DIR}/KPkPassConfigVersion.cmake"
        DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
        COMPONENT Devel)

install(EXPORT KPkPassTargets
        DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
        FILE KPkPassTargets.cmake
)
Volker Krause's avatar
Volker Krause committed
51
install(FILES org_kde_kpkpass.categories DESTINATION ${KDE_INSTALL_CONFDIR})