-
- endif()
-
- 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()
- endif()
-
-else(USE_QT5)
- find_package(Qt4 ${QT_MIN_VERSION} QUIET REQUIRED)
-
- if (BUILD_GUI)
- add_feature_info("QtDBus module" QT_QTDBUS_FOUND "Needed for supporting D-Bus-based notifications and tray icon, used by most modern desktop environments")
- if (QT_QTDBUS_FOUND)
- find_package(dbusmenu-qt QUIET CONFIG)
- set_package_properties(dbusmenu-qt PROPERTIES TYPE RECOMMENDED
- URL "https://launchpad.net/libdbusmenu-qt"
- DESCRIPTION "a library implementing the DBusMenu specification"
- PURPOSE "Required for having a context menu for the D-Bus-based tray icon"