569
by Friedrich W. H. Kossebau
Bump min cmake dep to 3.0 |
1 |
cmake_minimum_required(VERSION 3.0) |
2 |
||
575
by Albert Astals Cid
Follow KDE_APPLICATIONS_VERSION |
3 |
# KDE Application Version, managed by release script
|
588
by Jonathan Riddell
Change KDE_APPLICATIONS_VERSION to RELEASE_SERVICE_VERSION https://phabricator.kde.org/T11933 |
4 |
set(RELEASE_SERVICE_VERSION_MAJOR "20") |
592
by Albert Astals Cid
GIT_SILENT Upgrade release service version to 20.07.70. |
5 |
set(RELEASE_SERVICE_VERSION_MINOR "07") |
588
by Jonathan Riddell
Change KDE_APPLICATIONS_VERSION to RELEASE_SERVICE_VERSION https://phabricator.kde.org/T11933 |
6 |
set(RELEASE_SERVICE_VERSION_MICRO "70") |
7 |
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") |
|
575
by Albert Astals Cid
Follow KDE_APPLICATIONS_VERSION |
8 |
|
588
by Jonathan Riddell
Change KDE_APPLICATIONS_VERSION to RELEASE_SERVICE_VERSION https://phabricator.kde.org/T11933 |
9 |
project(kruler VERSION ${RELEASE_SERVICE_VERSION}) |
224
by Laurent Montel
Add cmake support (not tested) |
10 |
|
580
by Laurent Montel
It's time to increase qt version |
11 |
set(QT_MIN_VERSION "5.11.0") |
563
by Laurent Montel
Modernize |
12 |
set(KF5_MIN_VERSION "5.30.0") |
486.1.1
by Christoph Feck
Port KRuler to KF5 |
13 |
|
563
by Laurent Montel
Modernize |
14 |
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) |
486.1.1
by Christoph Feck
Port KRuler to KF5 |
15 |
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) |
16 |
||
17 |
add_definitions(-DTRANSLATION_DOMAIN="kruler") |
|
18 |
||
19 |
include(KDEInstallDirs) |
|
561
by Laurent Montel
Use KDEFrameworkCompilerSettings |
20 |
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) |
486.1.1
by Christoph Feck
Port KRuler to KF5 |
21 |
include(KDECMakeSettings) |
22 |
include(ECMInstallIcons) |
|
23 |
include(FeatureSummary) |
|
494
by Montel Laurent
Use new KDE_ macro |
24 |
include(ECMAddAppIcon) |
575
by Albert Astals Cid
Follow KDE_APPLICATIONS_VERSION |
25 |
include(ECMSetupVersion) |
486.1.1
by Christoph Feck
Port KRuler to KF5 |
26 |
|
27 |
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS |
|
28 |
Core
|
|
29 |
Widgets
|
|
30 |
)
|
|
31 |
||
563
by Laurent Montel
Modernize |
32 |
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS |
486.1.1
by Christoph Feck
Port KRuler to KF5 |
33 |
DocTools
|
34 |
I18n
|
|
35 |
Notifications
|
|
36 |
WindowSystem
|
|
37 |
XmlGui
|
|
38 |
)
|
|
554
by Laurent Montel
Make sure that it compiles with strict compile flags |
39 |
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT) |
40 |
add_definitions(-DQT_NO_URL_CAST_FROM_STRING) |
|
591.1.2
by Laurent Montel
GIT_SILENT: Remove DISABLE_DEPRECATED_BEFORE macro. It can break compile when we increase KF5/Qt5 |
41 |
|
584
by Laurent Montel
Make it compile without kf5 deprecated method |
42 |
|
578
by Laurent Montel
It compiles fine without foreach |
43 |
if (KF5ConfigWidgets_VERSION VERSION_GREATER "5.56.0") |
44 |
add_definitions(-DQT_NO_FOREACH) |
|
45 |
MESSAGE(STATUS "compile without foreach") |
|
46 |
endif() |
|
47 |
||
486.1.1
by Christoph Feck
Port KRuler to KF5 |
48 |
|
486.1.5
by Christoph Feck
Port native window moving to XCB |
49 |
if (NOT APPLE) |
50 |
find_package(X11) |
|
51 |
set (KRULER_HAVE_X11 ${X11_FOUND}) |
|
52 |
if (X11_FOUND) |
|
53 |
find_package(XCB COMPONENTS XCB) |
|
54 |
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED X11Extras) |
|
55 |
endif() |
|
56 |
endif() |
|
57 |
||
58 |
configure_file(krulerconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/krulerconfig.h) |
|
59 |
||
489.1.1
by Montel Laurent
Reactivate icons. Fix install notifyrc |
60 |
add_subdirectory( pics ) |
455
by Montel Laurent
Add doc directory |
61 |
add_subdirectory( doc ) |
224
by Laurent Montel
Add cmake support (not tested) |
62 |
|
63 |
########### next target ###############
|
|
64 |
||
588
by Jonathan Riddell
Change KDE_APPLICATIONS_VERSION to RELEASE_SERVICE_VERSION https://phabricator.kde.org/T11933 |
65 |
ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KRULER VERSION_HEADER kruler_version.h) |
575
by Albert Astals Cid
Follow KDE_APPLICATIONS_VERSION |
66 |
|
534.1.16
by Aurélien Gâteau
Add indicator overlay |
67 |
set(kruler_SRCS klineal.cpp main.cpp krulersystemtray.cpp) |
224
by Laurent Montel
Add cmake support (not tested) |
68 |
|
486.1.1
by Christoph Feck
Port KRuler to KF5 |
69 |
ki18n_wrap_ui(kruler_SRCS cfg_appearance.ui cfg_advanced.ui) |
70 |
||
71 |
kconfig_add_kcfg_files(kruler_SRCS kruler.kcfgc) |
|
72 |
||
496
by Montel Laurent
Rename icons |
73 |
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/*-apps-kruler.png") |
494
by Montel Laurent
Use new KDE_ macro |
74 |
ecm_add_app_icon(kruler_SRCS ICONS ${ICONS_SRCS}) |
486.1.1
by Christoph Feck
Port KRuler to KF5 |
75 |
|
76 |
add_executable(kruler ${kruler_SRCS}) |
|
77 |
||
78 |
target_link_libraries(kruler KF5::I18n KF5::Notifications KF5::WindowSystem KF5::XmlGui) |
|
486.1.5
by Christoph Feck
Port native window moving to XCB |
79 |
if (X11_FOUND) |
80 |
target_link_libraries(kruler Qt5::X11Extras ${XCB_LIBRARIES}) |
|
81 |
endif() |
|
224
by Laurent Montel
Add cmake support (not tested) |
82 |
|
494
by Montel Laurent
Use new KDE_ macro |
83 |
install(TARGETS kruler ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) |
224
by Laurent Montel
Add cmake support (not tested) |
84 |
|
85 |
||
86 |
########### install files ###############
|
|
87 |
||
494
by Montel Laurent
Use new KDE_ macro |
88 |
install( PROGRAMS org.kde.kruler.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) |
512
by Harald Sitter
add appstream file to kruler |
89 |
install( FILES org.kde.kruler.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} ) |
494
by Montel Laurent
Use new KDE_ macro |
90 |
install( FILES kruler.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} ) |
91 |
install( FILES move.wav DESTINATION ${KDE_INSTALL_DATADIR}/kruler/sounds ) |
|
492
by Montel Laurent
Add missing feature_summary |
92 |
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) |
563
by Laurent Montel
Modernize |
93 |