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 "22")
0005 set (RELEASE_SERVICE_VERSION_MINOR "11")
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.15)
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 
0061 option(COMPILE_QML "Precompile QML code" OFF)
0062 option(WITHOUT_X11 "Build without X11 Keyboard Layout Detection (skips finding X11)" OFF)
0063 
0064 if (NOT WITHOUT_X11)
0065     find_package(X11)
0066     find_package(XCB OPTIONAL_COMPONENTS XCB XKB)
0067     if (QT_MAJOR_VERSION STREQUAL "5")
0068         find_package(Qt5X11Extras ${QT_MIN_VERSION} CONFIG)
0069     endif()
0070 
0071     if (Qt5X11Extras_FOUND AND X11_FOUND AND X11_Xkbfile_FOUND AND X11_Xkb_FOUND AND XCB_FOUND AND XCB_XKB_FOUND)
0072         set(KTOUCH_BUILD_WITH_X11 TRUE)
0073     endif()
0074 
0075     add_feature_info ("Keyboard Layout Detection" KTOUCH_BUILD_WITH_X11 "needs Qt5X11Extras, libX11, libxkb, libxkbfile, libxcb, and libxcb-xkb")
0076 endif()
0077 
0078 # enable QML debugging for debug builds
0079 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG")
0080 
0081 # subdirectories to build
0082 ecm_optional_add_subdirectory(data)
0083 ecm_optional_add_subdirectory(doc)
0084 ecm_optional_add_subdirectory(src)
0085 # ecm_optional_add_subdirectory(sounds)
0086 ecm_optional_add_subdirectory(icons)
0087 
0088 # files to install in the ktouch project root directory
0089 ki18n_install(po)
0090 if (KF5DocTools_FOUND)
0091     kdoctools_install(po)
0092 endif()
0093 install( PROGRAMS org.kde.ktouch.desktop  DESTINATION  ${KDE_INSTALL_APPDIR} )
0094 install(FILES org.kde.ktouch.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0095 
0096 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)