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

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 # KDE Application Version, managed by release script
0004 set(RELEASE_SERVICE_VERSION_MAJOR "24")
0005 set(RELEASE_SERVICE_VERSION_MINOR "04")
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 project(kwordquiz VERSION ${RELEASE_SERVICE_VERSION})
0010 
0011 if(NOT MSVC)
0012     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wno-switch -O2 -g")
0013     set(CMAKE_CXX_FLAGS_RELEASE "-Wall -Wno-switch -O2")
0014     set(CMAKE_CXX_FLAGS_DEBUG  "-Wall -Wno-switch -g3 -ggdb -O0" CACHE STRING "Debug options." FORCE)
0015 endif(NOT MSVC)
0016 
0017 include(FeatureSummary)
0018 set(KF_MIN_VERSION "5.240.0")
0019 set(REQUIRED_QT_VERSION "6.5.0")
0020 set(KDE_COMPILERSETTINGS_LEVEL "5.240.0")
0021 find_package(ECM ${KF_MIN_VERSION} NO_MODULE REQUIRED)
0022 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} )
0023 
0024 
0025 include(KDEInstallDirs)
0026 include(KDECMakeSettings)
0027 include(KDECompilerSettings NO_POLICY_SCOPE)
0028 include(ECMInstallIcons)
0029 include(ECMAddAppIcon)
0030 include(KDEClangFormat)
0031 include(ECMSetupVersion)
0032 include(ECMAddTests)
0033 include(ECMDeprecationSettings)
0034 include(KDEGitCommitHooks)
0035 
0036 set(CMAKE_CXX_STANDARD 17)
0037 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0038 
0039 find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE COMPONENTS
0040     Core
0041     Widgets
0042     PrintSupport
0043     Quick
0044     QuickControls2
0045     Qml
0046     Svg
0047     Multimedia
0048     Xml
0049 )
0050 set_package_properties(Qt6 PROPERTIES
0051     TYPE REQUIRED
0052     PURPOSE "Base application components"
0053 )
0054 
0055 find_package(KF6 ${KF5_MIN_VERSION} COMPONENTS
0056     I18n
0057     Crash
0058     Config
0059     DocTools
0060     NewStuff
0061     Kirigami
0062     DBusAddons
0063 )
0064 set_package_properties(KF6 PROPERTIES
0065     TYPE REQUIRED
0066     PURPOSE "Base application components"
0067 )
0068 
0069 find_package(KF6KirigamiAddons 0.11.0)
0070 set_package_properties(KF6KirigamiAddons PROPERTIES
0071     TYPE REQUIRED
0072     PURPOSE "Kirigami addons application UI framework"
0073 )
0074 
0075 include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
0076 
0077 find_package(LibKEduVocDocument REQUIRED)
0078 add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
0079 add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
0080 ecm_set_disabled_deprecation_versions(QT 6.4  KF 5.89.0)
0081 
0082 add_subdirectory(doc)
0083 add_subdirectory(src)
0084 
0085 if(BUILD_TESTING)
0086     find_package(Qt6Test REQUIRED)
0087 
0088     add_subdirectory(autotests)
0089 endif()
0090 
0091 ki18n_install(po)
0092 if (KF5DocTools_FOUND)
0093     kdoctools_install(po)
0094 endif()
0095 
0096 install(FILES org.kde.kwordquiz.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0097 install(FILES org.kde.kwordquiz.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
0098 
0099 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
0100 
0101 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
0102 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0103 
0104 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)