Debian Codegraph @

project/bundles/3rdparty/ext_kf6/CMakeLists.txt

raw
1 # Script to build KF5 Frameworks.
2 #
3 # Copyright (c) 2015-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
4 #
5 # Redistribution and use is allowed according to the terms of the BSD license.
6 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
7 #
8
9 set(EXTPREFIX_frameworks "${EXTPREFIX}")
10
11 function(InstallKF6Component
12 name
13 version
14 argoptions
15 patch)
16
17 if(${name} STREQUAL "libksane")
18 set(giturl "https://invent.kde.org/graphics/${name}.git")
19 elseif(${name} STREQUAL "ksanecore")
20 set(giturl "https://invent.kde.org/libraries/${name}.git")
21 elseif(${name} STREQUAL "qca")
22 set(giturl "https://invent.kde.org/libraries/${name}.git")
23 elseif(${name} STREQUAL "phonon")
24 set(giturl "https://invent.kde.org/libraries/${name}.git")
25 elseif(${name} STREQUAL "plasma-wayland-protocols")
26 set(giturl "https://invent.kde.org/libraries/${name}.git")
27 elseif(${name} STREQUAL "breeze")
28 set(giturl "https://invent.kde.org/plasma/${name}.git")
29 else()
30 set(giturl "https://invent.kde.org/frameworks/${name}.git")
31 endif()
32
33 message(STATUS "--------------------------------")
34 message(STATUS "KDE component : ${name}")
35 message(STATUS "Component version: ${version}")
36 message(STATUS "Component Git Url: ${giturl}")
37 message(STATUS "Configure options: ${argoptions}")
38 message(STATUS "Patch to apply : ${patch}")
39
40 if(APPLE)
41
42 if(NOT "${patch}" STREQUAL "")
43 set(patch "${PATCH_COMMAND};-p1;-i;${CMAKE_CURRENT_SOURCE_DIR}/${patch};&&")
44 endif()
45
46 ExternalProject_Add(ext_${name}
47 DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
48 GIT_REPOSITORY ${giturl}
49 GIT_TAG ${version}
50
51 PATCH_COMMAND ${patch}
52 cp ${CMAKE_CURRENT_SOURCE_DIR}/../../${DK_APPLE_PACKAGE_MANAGER}/fixbundledatapath.sh <SOURCE_DIR>/. &&
53 <SOURCE_DIR>/fixbundledatapath.sh
54
55 INSTALL_DIR ${EXTPREFIX_frameworks}
56 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
57 -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
58 ${GLOBAL_PROFILE}
59 -DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
60 -DBUILD_TESTING=OFF
61 "${argoptions}"
62 -Wno-dev
63 UPDATE_COMMAND ""
64 ALWAYS 0
65 )
66
67 else()
68
69 if(NOT "${patch}" STREQUAL "")
70 set(patch "${PATCH_COMMAND};-p1;-i;${CMAKE_CURRENT_SOURCE_DIR}/${patch}")
71 endif()
72
73 ExternalProject_Add(ext_${name}
74 DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
75 GIT_REPOSITORY ${giturl}
76 GIT_TAG ${version}
77
78 PATCH_COMMAND ${patch}
79
80 INSTALL_DIR ${EXTPREFIX_frameworks}
81 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
82 -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
83 ${GLOBAL_PROFILE}
84 -DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
85 -DBUILD_TESTING=OFF
86 "${argoptions}"
87 -Wno-dev
88 UPDATE_COMMAND ""
89 ALWAYS 0
90 )
91
92 endif()
93
94 endfunction()
95
96 if(MSVC) # Windows
97
98 # All is currently broken about the generation and resource icons.
99 # For the moment, We uses a RCC icon sets pre-compiled under Linux.
100
101 set(BreezeIconsOptions -DBINARY_ICONS_RESOURCE=OFF -DSKIP_INSTALL_ICONS=OFF -DWITH_ICON_GENERATION=OFF)
102
103 elseif(APPLE) # macOS
104
105 # Python3 lxml module detection fail under macOS with Macports even if right Python3 version is selected.
106 # Sounds like a python3 path problem not propagated in cmake scripts to run the generation icons python3 script.
107 # After investiguations, the macOS python3 interpreter is used and this one do not provides the lxml module.
108
109 set(BreezeIconsOptions -DBINARY_ICONS_RESOURCE=ON -DWITH_ICON_GENERATION=OFF)
110
111 else() # Linux
112
113 # All is suitable here.
114
115 set(BreezeIconsOptions -DBINARY_ICONS_RESOURCE=ON)
116
117 endif()
118
119 set(MarbleQtOnlyOptions -DWITH_DESIGNER_PLUGIN=OFF -DBUILD_MARBLE_TESTS=OFF -DBUILD_MARBLE_TOOLS=OFF -DBUILD_MARBLE_EXAMPLES=OFF -DBUILD_MARBLE_APPS=OFF -DBUILD_WITH_DBUS=OFF -DQTONLY=ON -DBUILD_TESTING=OFF)
120 set(BreezeOptions -DBUILD_QT6=ON -DBUILD_QT5=OFF -DWITH_DECORATIONS=OFF -DWITH_WALLPAPERS=OFF -DBUILD_TESTING=OFF)
121
122 set(Qt6CommonOptions -DQT_MAJOR_VERSION=6 -DBUILD_WITH_QT6=ON -DBUILD_PYTHON_BINDINGS=OFF)
123
124 InstallKF6Component(extra-cmake-modules ${KDE_VERSION} "${Qt6CommonOptions};-DBUILD_DOC=OFF" "")
125 InstallKF6Component(plasma-wayland-protocols v1.20.0 "${Qt6CommonOptions}" "wayland-proto-ecm-version.patch")
126 InstallKF6Component(kconfig ${KDE_VERSION} "${Qt6CommonOptions};-DKCONFIG_USE_QML=OFF" "")
127 InstallKF6Component(breeze-icons ${KDE_VERSION} "${Qt6CommonOptions};${BreezeIconsOptions}" "breeze-icons-dropsvg.patch")
128 InstallKF6Component(solid ${KDE_VERSION} "${Qt6CommonOptions}" "solid-iokit-fixes.patch")
129 InstallKF6Component(kcoreaddons ${KDE_VERSION} "${Qt6CommonOptions};-DKCOREADDONS_USE_QML=OFF" "")
130 InstallKF6Component(threadweaver ${KDE_VERSION} "${Qt6CommonOptions}" "")
131 InstallKF6Component(kwindowsystem ${KDE_VERSION} "${Qt6CommonOptions};-DKWINDOWSYSTEM_WAYLAND=OFF" "")
132 InstallKF6Component(karchive ${KDE_VERSION} "${Qt6CommonOptions};-DWITH_LIBZSTD=OFF;-DWITH_BZIP2=OFF" "")
133 InstallKF6Component(kdbusaddons ${KDE_VERSION} "${Qt6CommonOptions}" "")
134 InstallKF6Component(ki18n ${KDE_VERSION} "${Qt6CommonOptions}" "ki18n-disable-isocodes.patch")
135 InstallKF6Component(kcrash ${KDE_VERSION} "${Qt6CommonOptions}" "")
136 InstallKF6Component(kcodecs ${KDE_VERSION} "${Qt6CommonOptions}" "")
137 InstallKF6Component(kauth ${KDE_VERSION} "${Qt6CommonOptions}" "")
138 InstallKF6Component(kguiaddons ${KDE_VERSION} "${Qt6CommonOptions};-DWITH_WAYLAND=OFF" "")
139 InstallKF6Component(kwidgetsaddons ${KDE_VERSION} "${Qt6CommonOptions}" "")
140 InstallKF6Component(kitemviews ${KDE_VERSION} "${Qt6CommonOptions}" "")
141 InstallKF6Component(kcompletion ${KDE_VERSION} "${Qt6CommonOptions}" "")
142 InstallKF6Component(kcolorscheme ${KDE_VERSION} "${Qt6CommonOptions}" "")
143 InstallKF6Component(kconfigwidgets ${KDE_VERSION} "${Qt6CommonOptions}" "")
144 InstallKF6Component(kiconthemes ${KDE_VERSION} "${Qt6CommonOptions};-DKICONTHEMES_USE_QTQUICK=OFF" "")
145 InstallKF6Component(kservice ${KDE_VERSION} "${Qt6CommonOptions}" "")
146 InstallKF6Component(kglobalaccel ${KDE_VERSION} "${Qt6CommonOptions}" "")
147 InstallKF6Component(kcalendarcore ${KDE_VERSION} "${Qt6CommonOptions}" "")
148 InstallKF6Component(kxmlgui ${KDE_VERSION} "${Qt6CommonOptions}" "")
149 InstallKF6Component(kbookmarks ${KDE_VERSION} "${Qt6CommonOptions}" "")
150 InstallKF6Component(kimageformats ${KDE_VERSION} "${Qt6CommonOptions}" "")
151 InstallKF6Component(knotifyconfig ${KDE_VERSION} "${Qt6CommonOptions}" "")
152 InstallKF6Component(knotifications ${KDE_VERSION} "${Qt6CommonOptions}" "")
153 InstallKF6Component(kjobwidgets ${KDE_VERSION} "${Qt6CommonOptions}" "")
154 InstallKF6Component(sonnet ${KDE_VERSION} "${Qt6CommonOptions};-DSONNET_USE_QML=OFF" "sonnet-hunspell-version.patch")
155 InstallKF6Component(ktextwidgets ${KDE_VERSION} "${Qt6CommonOptions};-DWITH_TEXT_TO_SPEECH=OFF" "")
156 InstallKF6Component(kio ${KDE_VERSION} "${Qt6CommonOptions};-DWITH_WAYLAND=OFF;KIOCORE_ONLY=ON" "kio-drop-deps.patch")
157 InstallKF6Component(kinit ${KDE_VERSION} "${Qt6CommonOptions}" "")
158 InstallKF6Component(kdoctools ${KDE_VERSION} "${Qt6CommonOptions}" "")
159 InstallKF6Component(phonon ${KDE_VERSION} "${Qt6CommonOptions};-DPHONON_BUILD_QT5=OFF" "")
160 InstallKF6Component(ksanecore ${KA_VERSION} "${Qt6CommonOptions};-DQT_MAJOR_VERSION=6" "")
161 InstallKF6Component(libksane ${KA_VERSION} "${Qt6CommonOptions};-DQT_MAJOR_VERSION=6" "")
162 InstallKF6Component(kfilemetadata ${KDE_VERSION} "${Qt6CommonOptions}" "")
163 InstallKF6Component(qca v2.3.10 "${Qt6CommonOptions}" "")
164 InstallKF6Component(kwallet ${KDE_VERSION} "${Qt6CommonOptions};-DBUILD_KSECRETD=OFF;-DBUILD_KWALLETD=OFF;-DBUILD_KWALLET_QUERY=OFF" "")
165 InstallKF6Component(kpackage ${KDE_VERSION} "${Qt6CommonOptions}" "")
166 InstallKF6Component(attica ${KDE_VERSION} "${Qt6CommonOptions}" "")
167 InstallKF6Component(knewstuff ${KDE_VERSION} "${Qt6CommonOptions}" "")
168 InstallKF6Component(kitemmodels ${KDE_VERSION} "${Qt6CommonOptions}" "kitemmodels-drop-qml.patch")
169 InstallKF6Component(kparts ${KDE_VERSION} "${Qt6CommonOptions}" "")
170 InstallKF6Component(krunner ${KDE_VERSION} "${Qt6CommonOptions}" "")
171 InstallKF6Component(breeze ${KP_VERSION} "${Qt6CommonOptions};${BreezeOptions}" "breeze-common-rules.patch")