2021-03-15 20:17:11 -07:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
2021-03-16 02:23:27 -07:00
|
|
|
set(PROJECT_NAME cutefish-dock)
|
2021-03-15 20:17:11 -07:00
|
|
|
project(${PROJECT_NAME})
|
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2021-03-17 06:33:06 -07:00
|
|
|
set(QT Core Widgets Concurrent Quick QuickControls2 X11Extras DBus Svg LinguistTools)
|
2021-03-15 20:17:11 -07:00
|
|
|
find_package(Qt5 REQUIRED ${QT})
|
|
|
|
find_package(KF5WindowSystem REQUIRED)
|
|
|
|
find_package(dbusmenu-qt5 REQUIRED)
|
|
|
|
find_package(MeuiKit REQUIRED)
|
|
|
|
|
|
|
|
set(SRCS
|
|
|
|
src/applicationitem.h
|
|
|
|
src/applicationmodel.cpp
|
|
|
|
src/battery.cpp
|
|
|
|
src/brightness.cpp
|
|
|
|
src/controlcenterdialog.cpp
|
|
|
|
src/docksettings.cpp
|
|
|
|
src/iconthemeimageprovider.cpp
|
|
|
|
src/main.cpp
|
|
|
|
src/mainwindow.cpp
|
|
|
|
src/systemappmonitor.cpp
|
|
|
|
src/systemappitem.cpp
|
|
|
|
src/processprovider.cpp
|
|
|
|
src/trashmanager.cpp
|
|
|
|
src/volumemanager.cpp
|
|
|
|
src/utils.cpp
|
|
|
|
src/xwindowinterface.cpp
|
2021-03-20 02:17:41 -07:00
|
|
|
src/toplevelmenu.cpp
|
2021-03-15 20:17:11 -07:00
|
|
|
|
|
|
|
src/appearance.cpp
|
|
|
|
src/fakewindow.cpp
|
2021-03-17 06:33:06 -07:00
|
|
|
src/iconitem.cpp
|
|
|
|
src/managedtexturenode.cpp
|
2021-03-15 20:17:11 -07:00
|
|
|
|
2021-03-17 06:33:06 -07:00
|
|
|
src/systemtray/statusnotifieritemjob.cpp
|
|
|
|
src/systemtray/statusnotifieritemsource.cpp
|
|
|
|
src/systemtray/systemtraytypes.cpp
|
|
|
|
src/systemtray/systemtraytypedefs.h
|
|
|
|
src/systemtray/systemtraymodel.cpp
|
|
|
|
src/systemtray/statusnotifierwatcher.cpp
|
2021-03-15 20:17:11 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
set(RESOURCES
|
|
|
|
resources.qrc
|
|
|
|
)
|
|
|
|
|
2021-03-17 06:33:06 -07:00
|
|
|
set(statusnotifierwatcher_xml src/systemtray/org.kde.StatusNotifierWatcher.xml)
|
|
|
|
qt5_add_dbus_interface(SRCS ${statusnotifierwatcher_xml} statusnotifierwatcher_interface)
|
|
|
|
qt5_add_dbus_interface(SRCS src/systemtray/org.freedesktop.DBus.Properties.xml dbusproperties)
|
|
|
|
|
|
|
|
set(statusnotifieritem_xml src/systemtray/org.kde.StatusNotifierItem.xml)
|
|
|
|
set_source_files_properties(${statusnotifieritem_xml} PROPERTIES
|
|
|
|
NO_NAMESPACE false
|
|
|
|
INCLUDE "src/systemtray/systemtraytypes.h"
|
|
|
|
CLASSNAME OrgKdeStatusNotifierItem
|
|
|
|
)
|
|
|
|
qt5_add_dbus_interface(SRCS ${statusnotifieritem_xml} statusnotifieritem_interface)
|
|
|
|
|
|
|
|
qt5_add_dbus_adaptor(SRCS src/systemtray/org.kde.StatusNotifierWatcher.xml
|
|
|
|
src/systemtray/statusnotifierwatcher.h StatusNotifierWatcher)
|
|
|
|
|
2021-03-15 20:17:11 -07:00
|
|
|
add_executable(${PROJECT_NAME} ${SRCS} ${DBUS_SRCS} ${RESOURCES})
|
|
|
|
target_link_libraries(${PROJECT_NAME}
|
|
|
|
Qt5::Core
|
|
|
|
Qt5::Widgets
|
|
|
|
Qt5::Quick
|
|
|
|
Qt5::QuickControls2
|
|
|
|
Qt5::X11Extras
|
|
|
|
Qt5::Concurrent
|
|
|
|
Qt5::DBus
|
2021-03-17 06:33:06 -07:00
|
|
|
Qt5::Svg
|
2021-03-15 20:17:11 -07:00
|
|
|
|
|
|
|
MeuiKit
|
|
|
|
|
|
|
|
KF5::WindowSystem
|
|
|
|
dbusmenu-qt5
|
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB TS_FILES translations/*.ts)
|
|
|
|
qt5_create_translation(QM_FILES ${TS_FILES})
|
|
|
|
add_custom_target(translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES})
|
|
|
|
add_dependencies(${PROJECT_NAME} translations)
|
|
|
|
|
|
|
|
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION /usr/bin)
|
|
|
|
install(FILES ${QM_FILES} DESTINATION /usr/share/${PROJECT_NAME}/translations)
|