Warning, /plasma/latte-dock/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 project(lattedock)
0002 cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
0003 
0004 set(CMAKE_CXX_STANDARD 17)
0005 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0006 set(VERSION 0.10.77)
0007 set(AUTHOR "Michail Vourlakos, Smith Ar")
0008 set(EMAIL "mvourlakos@gmail.com, audoban@openmailbox.org")
0009 set(WEBSITE "https://userbase.kde.org/LatteDock")
0010 set(BUG_ADDRESS "https://bugs.kde.org/enter_bug.cgi?product=lattedock")
0011 set(FAQS "https://userbase.kde.org/LatteDock/FAQ")
0012 
0013 set(QT_MIN_VERSION "5.15.0")
0014 set(KF5_MIN_VERSION "5.88.0")
0015 set(KDE_COMPILERSETTINGS_LEVEL "5.84.0")
0016 
0017 set(KF5_LOCALE_PREFIX "")
0018 
0019 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0020 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
0021 
0022 include(KDEInstallDirs)
0023 include(CheckIncludeFiles)
0024 include(CMakePackageConfigHelpers)
0025 include(ECMOptionalAddSubdirectory)
0026 include(ECMQtDeclareLoggingCategory)
0027 include(KDECMakeSettings)
0028 include(KDECompilerSettings NO_POLICY_SCOPE)
0029 include(KDEPackageAppTemplates)
0030 include(WriteBasicConfigVersionFile)
0031 
0032 
0033 find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED NO_MODULE COMPONENTS DBus Gui Qml Quick)
0034 
0035 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0036     Activities Archive CoreAddons GuiAddons Crash DBusAddons Declarative GlobalAccel Kirigami2
0037     I18n IconThemes KIO NewStuff Notifications Plasma PlasmaQuick Wayland WindowSystem XmlGui)
0038    
0039 find_package(X11 REQUIRED)
0040 set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
0041     URL "http://www.x.org"
0042     TYPE OPTIONAL
0043     PURPOSE "Required for building the X11 based workspace")
0044 
0045 if(X11_FOUND)
0046     find_package(XCB MODULE REQUIRED COMPONENTS XCB RANDR SHAPE EVENT)
0047     set_package_properties(XCB PROPERTIES TYPE REQUIRED)
0048     find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS X11Extras)
0049 
0050     if(NOT X11_SM_FOUND)
0051         message(FATAL_ERROR "\nThe X11 Session Management (SM) development package could not be found.
0052                 \nPlease install libSM.\n")
0053     endif(NOT X11_SM_FOUND)
0054 
0055 endif()
0056 
0057 if(X11_FOUND AND XCB_XCB_FOUND)
0058     set(HAVE_X11 ON)
0059 endif()
0060 
0061 
0062 find_package(QtWaylandScanner REQUIRED)
0063 find_package(Qt${QT_MAJOR_VERSION}WaylandClient)
0064 find_package(PlasmaWaylandProtocols 1.6 REQUIRED)
0065 find_package(Wayland REQUIRED COMPONENTS Client)
0066 
0067 string(REGEX MATCH "\\.([^]]+)\\." KF5_VERSION_MINOR ${KF5_VERSION})
0068 string(REGEX REPLACE "\\." "" KF5_VERSION_MINOR ${KF5_VERSION_MINOR})
0069 
0070 message(STATUS "KF5 VERSION : ${KF5_VERSION}")
0071 message(STATUS "KF5 VERSION MINOR : ${KF5_VERSION_MINOR}")
0072 
0073 
0074 include(ECMFindQmlModule)
0075 ecm_find_qmlmodule(QtQuick 2.7)
0076 ecm_find_qmlmodule(QtQuick.Layouts 1.3)
0077 ecm_find_qmlmodule(QtQuick.Controls 1.4)
0078 ecm_find_qmlmodule(QtQuick.Controls.Styles.Plasma 2.0)
0079 ecm_find_qmlmodule(QtGraphicalEffects 1.0)
0080 ecm_find_qmlmodule(org.kde.kquickcontrolsaddons 2.0)
0081 ecm_find_qmlmodule(org.kde.plasma.core 2.0)
0082 ecm_find_qmlmodule(org.kde.plasma.components 2.0)
0083 
0084 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/app/config-latte.h.cmake
0085                ${CMAKE_CURRENT_BINARY_DIR}/app/config-latte.h)
0086 
0087 #hide warnings
0088 string(REPLACE "-Wall" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
0089 string(REPLACE "-Wdeprecated-declarations" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
0090 string(REPLACE "-Wreorder" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
0091 string(REPLACE "-Wunused-variable" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
0092 string(REPLACE "-Wunused-parameter" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
0093 
0094 #add format security check
0095 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Werror=format-security")
0096 
0097 message(STATUS "COMPILER FLAGS : ${CMAKE_CXX_FLAGS}")
0098 
0099 # Share Same Core Types between declarativeimports and app
0100 set(CORETYPESHEADER "LIBCORETYPES_H")
0101 configure_file(declarativeimports/coretypes.h.in declarativeimports/core/types.h)
0102 set(CORETYPESHEADER "APPCORETYPES_H")
0103 configure_file(declarativeimports/coretypes.h.in app/coretypes.h)
0104 set(CORETYPESHEADER "LATTEGENERALCONTAINMENTTYPES_H")
0105 configure_file(declarativeimports/coretypes.h.in containment/plugin/lattetypes.h)
0106 
0107 # Share App::Settings::GenericTools to containment actions
0108 configure_file(app/settings/generic/generictools.h containmentactions/contextmenu/generictools.h)
0109 configure_file(app/settings/generic/generictools.cpp containmentactions/contextmenu/generictools.cpp)
0110 configure_file(app/data/contextmenudata.h containmentactions/contextmenu/contextmenudata.h)
0111 
0112 # subdirectories
0113 add_subdirectory(declarativeimports)
0114 add_subdirectory(indicators)
0115 add_subdirectory(app)
0116 add_subdirectory(containmentactions)
0117 add_subdirectory(containment)
0118 add_subdirectory(icons)
0119 add_subdirectory(plasmoid)
0120 add_subdirectory(shell)
0121 
0122 ki18n_install(po)