| 1 |
project(lxqt-config-monitor) |
| 2 |
|
| 3 |
find_package(KF6Screen ${KF6SCREEN_MINIMUM_VERSION} REQUIRED) |
| 4 |
find_package(Qt6Svg ${QT_MINIMUM_VERSION} REQUIRED) |
| 5 |
find_package(Qt6SvgWidgets ${QT_MINIMUM_VERSION} REQUIRED) |
| 6 |
|
| 7 |
set(HEADERS |
| 8 |
monitorsettingsdialog.h |
| 9 |
monitor.h |
| 10 |
monitorwidget.h |
| 11 |
monitorpicture.h |
| 12 |
loadsettings.h |
| 13 |
settingsdialog.h |
| 14 |
managesavedsettings.h |
| 15 |
fastmenu.h |
| 16 |
kscreenutils.h |
| 17 |
) |
| 18 |
|
| 19 |
set(SOURCES |
| 20 |
main.cpp |
| 21 |
monitorsettingsdialog.cpp |
| 22 |
monitor.cpp |
| 23 |
monitorwidget.cpp |
| 24 |
timeoutdialog.cpp |
| 25 |
monitorpicture.cpp |
| 26 |
loadsettings.cpp |
| 27 |
settingsdialog.cpp |
| 28 |
managesavedsettings.cpp |
| 29 |
fastmenu.cpp |
| 30 |
kscreenutils.cpp |
| 31 |
) |
| 32 |
|
| 33 |
set(UIS |
| 34 |
monitorsettingsdialog.ui |
| 35 |
monitorwidget.ui |
| 36 |
timeoutdialog.ui |
| 37 |
monitorpicture.ui |
| 38 |
managesavedsettings.ui |
| 39 |
fastmenu.ui |
| 40 |
) |
| 41 |
|
| 42 |
set(ICONS |
| 43 |
icons/monitor.svg |
| 44 |
) |
| 45 |
|
| 46 |
# Config file |
| 47 |
configure_file(resources/configure.in configure.h) |
| 48 |
|
| 49 |
# Translations ********************************** |
| 50 |
lxqt_translate_ts(QM_FILES |
| 51 |
UPDATE_TRANSLATIONS |
| 52 |
${UPDATE_TRANSLATIONS} |
| 53 |
SOURCES |
| 54 |
${HEADERS} |
| 55 |
${SOURCES} |
| 56 |
${UIS} |
| 57 |
INSTALL_DIR |
| 58 |
"${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}" |
| 59 |
) |
| 60 |
|
| 61 |
lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME}) |
| 62 |
lxqt_translate_desktop(DESKTOP_FILES |
| 63 |
SOURCES |
| 64 |
"resources/${PROJECT_NAME}.desktop.in" |
| 65 |
"resources/lxqt-config-monitor-autostart.desktop.in" |
| 66 |
USE_YAML |
| 67 |
) |
| 68 |
|
| 69 |
#************************************************ |
| 70 |
|
| 71 |
add_executable(${PROJECT_NAME} |
| 72 |
${SOURCES} |
| 73 |
${RESOURCES} |
| 74 |
${QRC_SOURCES} |
| 75 |
${DESKTOP_FILES} |
| 76 |
${QM_FILES} |
| 77 |
${QM_LOADER} |
| 78 |
) |
| 79 |
|
| 80 |
target_link_libraries(${PROJECT_NAME} |
| 81 |
Qt6::Widgets |
| 82 |
Qt6::Svg |
| 83 |
Qt6::SvgWidgets |
| 84 |
KF6::Screen |
| 85 |
lxqt |
| 86 |
) |
| 87 |
|
| 88 |
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}) |
| 89 |
install(FILES ${DESKTOP_FILES} DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/applications") |
| 90 |
install(FILES ${ICONS} DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/lxqt/icons") |
| 91 |
|