Warning, /utilities/totalreqall/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
0002 project(totalreqall VERSION 0.5.0)
0003 
0004 set(QT_MIN_VERSION "5.10.0")
0005 set(KF5_REQUIRED_VERSION "5.56.0")
0006 
0007 find_package(ECM ${KF5_REQUIRED_VERSION} REQUIRED NO_MODULE)
0008 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
0009 
0010 set(CPACK_PACKAGE_VERSION_MAJOR "0")
0011 set(CPACK_PACKAGE_VERSION_MINOR "6")
0012 set(CPACK_PACKAGE_VERSION_PATCH "0")
0013 
0014 include(KDEInstallDirs)
0015 include(KDECMakeSettings)
0016 include(KDECompilerSettings NO_POLICY_SCOPE)
0017 include(FeatureSummary)
0018 include(CMakeDependentOption)
0019 
0020 # not required
0021 # this is first to set Qt5_FOUND to ON even if the TTS is not found
0022 find_package(Qt5 ${QT_MIN_VERSION} CONFIG COMPONENTS TextToSpeech)
0023 
0024 find_package(PkgConfig REQUIRED)
0025 pkg_check_modules(SWORD REQUIRED IMPORTED_TARGET sword)
0026 find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets LinguistTools)
0027 find_package(sword REQUIRED)
0028 find_package(KF5 ${KF5_DEP_VERSION}
0029         REQUIRED COMPONENTS
0030                 XmlGui
0031                 CoreAddons
0032                 I18n
0033 )
0034 
0035 cmake_dependent_option(TTS_ENABLED "Compile with text-to-speech support" ON Qt5TextToSpeech_FOUND OFF)
0036 
0037 if(NOT TTS_ENABLED)
0038         add_compile_definitions(NO_TTS)
0039 endif()
0040 
0041 configure_file(AppInfo.h.cmake AppInfo.h)
0042 
0043 include_directories(src)
0044 
0045 add_executable(totalreqall
0046         src/ChooseReferenceWidget.cpp
0047         src/CustomContentAdder.cpp
0048         src/Helper.cpp
0049         src/MainWindow.cpp
0050         src/MemorizeWidget.cpp
0051         src/SavedContentLoader.cpp
0052         src/SettingsDialog.cpp
0053         src/SimpleRefChooser.cpp
0054         src/UserSettings.cpp
0055         src/WelcomePage.cpp
0056         src/main.cpp
0057         general.qrc
0058         icons.qrc
0059 )
0060 
0061 target_link_libraries(totalreqall
0062         Qt5::Widgets
0063         sword::sword
0064         KF5::CoreAddons
0065         KF5::XmlGui
0066         KF5::I18n
0067         PkgConfig::SWORD
0068 )
0069 
0070 if(TTS_ENABLED)
0071         target_link_libraries(totalreqall Qt5::TextToSpeech)
0072 endif()
0073 
0074 install(TARGETS totalreqall ${INSTALL_TARGETS_DEFAULT_ARGS})
0075 install(FILES org.kde.totalreqall.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0076 install(PROGRAMS org.kde.totalreqall.desktop DESTINATION  ${XDG_APPS_INSTALL_DIR})
0077 
0078 qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} TotalReqall_en_US.ts)
0079 
0080 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)