Skip to content
CMakeLists.txt 1.64 KiB
Newer Older
Kevin Whitaker's avatar
Kevin Whitaker committed
project(qiflora)

cmake_minimum_required(VERSION 2.8.12)
set(KF5_MIN_VERSION "5.44.0")
set(QT_MIN_VERSION "5.12.0")
Kevin Whitaker's avatar
Kevin Whitaker committed

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

include(FeatureSummary)

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

find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
Kevin Whitaker's avatar
Kevin Whitaker committed

# 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(ECMSetupVersion)
include(ECMGenerateHeaders)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(ECMPoQmTools)
include(KDECompilerSettings NO_POLICY_SCOPE)

################# Find dependencies #################

find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Svg QuickControls2 Bluetooth Charts)
find_package(KF5Kirigami2 ${KF5_MIN_VERSION} REQUIRED)
find_package(KF5CoreAddons ${KF5_MIN_VERSION} REQUIRED)
Kevin Whitaker's avatar
Kevin Whitaker committed

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

set(CMAKE_CXX_STANDARD 11)
Kevin Whitaker's avatar
Kevin Whitaker committed

################# build and install #################
add_subdirectory(src)

install(PROGRAMS packaging/org.eyecreate.qiflora.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES packaging/org.eyecreate.qiflora.svg DESTINATION ${KDE_INSTALL_ICONDIR})
install(FILES packaging/org.eyecreate.qiflora.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
Kevin Whitaker's avatar
Kevin Whitaker committed

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)