- set_package_properties(ECM PROPERTIES TYPE ${ecm_find_type}
- URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules"
- DESCRIPTION "extra modules for CMake, maintained by the KDE project"
- PURPOSE "Required to find KDE Frameworks components"
- )
-
- if (ECM_FOUND)
- list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
- if (WITH_KDE)
- find_package(KF5 COMPONENTS ConfigWidgets CoreAddons Notifications NotifyConfig TextWidgets WidgetsAddons XmlGui QUIET)
- set_package_properties(KF5 PROPERTIES TYPE REQUIRED
- URL "http://www.kde.org"
- DESCRIPTION "KDE Frameworks"
- PURPOSE "Required for integration into the Plasma desktop"
- )
- else(WITH_KDE)
- find_package(KF5Sonnet QUIET)
- set_package_properties(KF5Sonnet PROPERTIES TYPE RECOMMENDED
- URL "http://api.kde.org/frameworks-api/frameworks5-apidocs/sonnet/html"
- DESCRIPTION "framework for providing spell-checking capabilities"
- PURPOSE "Enables spell-checking support in input widgets"
- )
- endif(WITH_KDE)
- endif(ECM_FOUND)
-
- endif(BUILD_GUI)
-
- if (BUILD_CORE)
- find_package(Qt5Script QUIET)
- set_package_properties(Qt5Script PROPERTIES TYPE REQUIRED
- DESCRIPTION "provides scripting support for Qt5"
- )
- find_package(Qt5Sql QUIET)
- set_package_properties(Qt5Sql PROPERTIES TYPE REQUIRED
- DESCRIPTION "the database support module for Qt5"
- )
-
- find_package(QCA2-QT5)
- set_package_properties(QCA2-QT5 PROPERTIES TYPE RECOMMENDED
- URL "https://projects.kde.org/projects/kdesupport/qca"
- DESCRIPTION "Qt Cryptographic Architecture"
- PURPOSE "Required for encryption support"
- )
-
- endif(BUILD_CORE)
-
- find_package(Qt5LinguistTools QUIET)
- set_package_properties(Qt5LinguistTools PROPERTIES TYPE RECOMMENDED
- DESCRIPTION "contains tools for handling translation files"
- PURPOSE "Required for having translations"
- )
-
- # Some Qt5 versions do not define a target for lconvert, so we need to find it ourselves
- if (Qt5LinguistTools_FOUND)
- if (NOT TARGET Qt5::lconvert AND TARGET Qt5::lrelease)
- get_target_property(_lrelease_location Qt5::lrelease LOCATION)
- get_filename_component(_lrelease_path ${_lrelease_location} PATH)
- find_program(QT_LCONVERT_EXECUTABLE NAMES lconvert-qt5 lconvert PATHS ${_lrelease_path} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- elseif(TARGET Qt5::lconvert AND NOT Qt5_LCONVERT_EXECUTABLE)
- # Newer Qt5 versions define the target, but not the Qt5_LCONVERT_EXECUTABLE variable for some reason
- get_target_property(QT_LCONVERT_EXECUTABLE Qt5::lconvert LOCATION)
- endif()
-
- # Compatibility with the Qt4 variables
- set(QT_LRELEASE_EXECUTABLE ${Qt5_LRELEASE_EXECUTABLE})
- set(QT_LUPDATE_EXECUTABLE ${Qt5_LUPDATE_EXECUTABLE})
- if (Qt5_LCONVERT_EXECUTABLE)
- set(QT_LCONVERT_EXECUTABLE ${Qt5_LCONVERT_EXECUTABLE})
- endif()