CMakeLists.txt 1.62 KB
Newer Older
1 2
project(plasma-camera)

Jonah Brüchert's avatar
Jonah Brüchert committed
3
cmake_minimum_required(VERSION 2.8.12)
4 5
set(KF5_MIN_VERSION "5.18.0")
set(QT_MIN_VERSION "5.5.0")
6

7 8 9 10 11 12 13 14
################# Disallow in-source build #################

if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
   message(FATAL_ERROR "This application requires an out of source build. Please create a separate build directory.")
endif()


# Make CPack available to easy generate binary packages
15 16 17 18 19 20 21 22 23 24
include(CPack)
include(FeatureSummary)

################# 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})

25 26
include(ECMSetupVersion)
include(ECMGenerateHeaders)
27 28
include(KDEInstallDirs)
include(KDECMakeSettings)
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
include(ECMPoQmTools)
include(KDECompilerSettings NO_POLICY_SCOPE)

set(KF5_VERSION "5.22.0")

find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Svg QuickControls2 Multimedia)

find_package(KF5Kirigami2 ${KF5_DEP_VERSION} "5.22.0")

################# Enable C++11 features for clang and gcc #################

if(UNIX)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x")
endif()

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

set (QT_MIN_VERSION "5.6.0")

find_package(PkgConfig)
#########################################################################
50

51
add_subdirectory(src)
52

53
install(PROGRAMS org.kde.plasma-camera.desktop DESTINATION ${KDE_INSTALL_APPDIR})
54

55
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
56