Warning, /education/ktouch/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # KTouch CMakeLists.txt file
0002 #
0003 # KDE Application Version, managed by release script
0004 set (RELEASE_SERVICE_VERSION_MAJOR "23")
0005 set (RELEASE_SERVICE_VERSION_MINOR "03")
0006 set (RELEASE_SERVICE_VERSION_MICRO "70")
0007 set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0008 
0009 
0010 cmake_minimum_required(VERSION 3.16)
0011 project(ktouch VERSION ${RELEASE_SERVICE_VERSION})
0012 
0013 set(QT_MIN_VERSION "5.15.2")
0014 set(KF5_MIN_VERSION "5.90.0")
0015 set (KDE_COMPILERSETTINGS_LEVEL "5.82.0")
0016 
0017 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0018 find_package(KF5DocTools)
0019 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} )
0020 
0021 include(KDEInstallDirs)
0022 include(ECMAddTests)
0023 include(KDECMakeSettings)
0024 include(KDECompilerSettings NO_POLICY_SCOPE)
0025 include(ECMInstallIcons)
0026 include(ECMOptionalAddSubdirectory)
0027 include(ECMSetupVersion)
0028 include(FeatureSummary)
0029 
0030 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS
0031     Core
0032     Gui
0033     Qml
0034     Quick
0035     QuickWidgets
0036     QuickControls2
0037     Sql
0038     Widgets
0039     Xml
0040     XmlPatterns
0041 )
0042 find_package(Qt${QT_MAJOR_VERSION} CONFIG QUIET OPTIONAL_COMPONENTS QuickCompiler)
0043 
0044 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0045     Completion
0046     Config
0047     ConfigWidgets
0048     CoreAddons
0049     DocTools
0050     I18n
0051     ItemViews
0052     KCMUtils
0053     TextWidgets
0054     WidgetsAddons
0055     WindowSystem
0056     XmlGui
0057     IconThemes
0058 )
0059 
0060 find_package(KQtQuickCharts)
0061 set_package_properties(KQtQuickCharts PROPERTIES
0062     DESCRIPTION "QtQuick plugin to render beautiful and interactive charts"
0063     URL "https://commits.kde.org/kqtquickcharts"
0064     TYPE RUNTIME
0065 )
0066 
0067 option(COMPILE_QML "Precompile QML code" OFF)
0068 option(WITHOUT_X11 "Build without X11 Keyboard Layout Detection (skips finding X11)" OFF)
0069 
0070 if (NOT WITHOUT_X11)
0071     find_package(X11)
0072     find_package(XCB OPTIONAL_COMPONENTS XCB XKB)
0073     if (QT_MAJOR_VERSION STREQUAL "5")
0074         find_package(Qt5X11Extras ${QT_MIN_VERSION} CONFIG)
0075     endif()
0076 
0077     if (Qt5X11Extras_FOUND AND X11_FOUND AND X11_Xkbfile_FOUND AND X11_Xkb_FOUND AND XCB_FOUND AND XCB_XKB_FOUND)
0078         set(KTOUCH_BUILD_WITH_X11 TRUE)
0079     endif()
0080 
0081     add_feature_info ("Keyboard Layout Detection" KTOUCH_BUILD_WITH_X11 "needs Qt5X11Extras, libX11, libxkb, libxkbfile, libxcb, and libxcb-xkb")
0082 endif()
0083 
0084 # enable QML debugging for debug builds
0085 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG")
0086 
0087 # subdirectories to build
0088 ecm_optional_add_subdirectory(data)
0089 ecm_optional_add_subdirectory(doc)
0090 ecm_optional_add_subdirectory(src)
0091 # ecm_optional_add_subdirectory(sounds)
0092 ecm_optional_add_subdirectory(icons)
0093 
0094 # files to install in the ktouch project root directory
0095 ki18n_install(po)
0096 if (KF5DocTools_FOUND)
0097     kdoctools_install(po)
0098 endif()
0099 install( PROGRAMS org.kde.ktouch.desktop  DESTINATION  ${KDE_INSTALL_APPDIR} )
0100 install(FILES org.kde.ktouch.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0101 
0102 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)