CMakeLists.txt 1.69 KB
Newer Older
Sebastian Kügler's avatar
Sebastian Kügler committed
1
project(plasma-settings)
Sebastian Kügler's avatar
Sebastian Kügler committed
2

Sebastian Kügler's avatar
Sebastian Kügler committed
3 4 5 6 7
cmake_minimum_required(VERSION 2.8.10.1)

################# Disallow in-source build #################

if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
Jonah Brüchert's avatar
Jonah Brüchert committed
8
   message(FATAL_ERROR "plasma-settings requires an out of source build. Please create a separate build directory and run 'cmake path_to_plasma-settings [options]' there.")
Sebastian Kügler's avatar
Sebastian Kügler committed
9 10 11 12
endif()

include(CPack)
include(FeatureSummary)
13
find_package(PkgConfig)
Sebastian Kügler's avatar
Sebastian Kügler committed
14 15 16 17 18 19 20 21 22 23 24

################# set KDE specific information #################

find_package(ECM 0.0.8 REQUIRED NO_MODULE)

# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
Marco Martin's avatar
Marco Martin committed
25
include(ECMQMLModules)
Sebastian Kügler's avatar
Sebastian Kügler committed
26 27 28 29 30 31 32 33

find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui)

################# now find all used packages #################

set (QT_MIN_VERSION "5.4.0")

find_package(KF5 REQUIRED COMPONENTS
Jonah Brüchert's avatar
Jonah Brüchert committed
34 35 36 37 38 39 40 41 42 43 44 45 46
    WindowSystem
    CoreAddons
    Solid
    Config
    Auth
    DBusAddons
    I18n
    Plasma
    PlasmaQuick
    Declarative
    KIO
    KDELibs4Support
)
Sebastian Kügler's avatar
Sebastian Kügler committed
47

48 49 50 51
find_package(KAccounts)
find_package(AccountsQt5 1.10 CONFIG)
find_package(SignOnQt5 8.55 CONFIG)

Marco Martin's avatar
Marco Martin committed
52 53
ecm_find_qmlmodule(org.kde.kcm 1.0)

54 55 56 57
if (KAccounts_FOUND AND AccountsQt5_FOUND AND SignOnQt5_FOUND)
    include_directories(${ACCOUNTSQT_INCLUDE_DIRS} ${SIGNONQT_INCLUDE_DIRS})
endif()

Sebastian Kügler's avatar
Sebastian Kügler committed
58
add_subdirectory(src)
59
add_subdirectory(import)
60
add_subdirectory(modules)
Sebastian Kügler's avatar
Sebastian Kügler committed
61

Marco Martin's avatar
Marco Martin committed
62
install(DIRECTORY package/ DESTINATION ${KDE_INSTALL_DATAROOTDIR}/kpackage/genericqml/org.kde.plasma.settings)
Sebastian Kügler's avatar
Sebastian Kügler committed
63

64
install(FILES org.kde.mobile.plasmasettings.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
Sebastian Kügler's avatar
Sebastian Kügler committed
65