Debian Codegraph @

project/bundles/vcpkg/02-build-extralibs.sh

raw
1 #!/bin/bash
2
3 # Script to build extra libraries using VCPKG.
4 #
5 # SPDX-FileCopyrightText: 2015-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
6 #
7 # SPDX-License-Identifier: BSD-3-Clause
8 #
9
10 # Halt and catch errors
11 set -eE
12 trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG
13 trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR
14
15 #################################################################################################
16 # Manage script traces to log file
17
18 mkdir -p ./logs
19 exec > >(tee ./logs/build-extralibs.full.log) 2>&1
20
21 #################################################################################################
22
23 echo "02-build-extralibs.sh : build extra libraries."
24 echo "----------------------------------------------"
25
26 #################################################################################################
27 # Pre-processing checks
28
29 . ./common.sh
30 . ./config.sh
31 StartScript
32 ChecksCPUCores
33 ChecksCmakeBin
34 RegisterRemoteServers
35 AppendVCPKGPaths
36
37 ORIG_WD="`pwd`"
38
39 #################################################################################################
40
41 if [ ! -d $BUILDING_DIR/dk_cmake ] ; then
42 mkdir -p $BUILDING_DIR/dk_cmake
43 fi
44
45 cd $BUILDING_DIR/dk_cmake
46
47 rm -rf $BUILDING_DIR/dk_cmake/* || true
48
49 "${CMAKE_BIN}" $ORIG_WD/../3rdparty \
50 -DCMAKE_TOOLCHAIN_FILE=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake \
51 -DVCPKG_TARGET_TRIPLET=$VCPKG_TRIPLET \
52 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
53 -DCMAKE_COLOR_MAKEFILE=ON \
54 -DCMAKE_INSTALL_PREFIX=$VCPKG_INSTALL_PREFIX \
55 -DINSTALL_ROOT=$VCPKG_INSTALL_PREFIX \
56 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
57 -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR \
58 -DKA_VERSION=$DK_KA_VERSION \
59 -DKP_VERSION=$DK_KP_VERSION \
60 -DKDE_VERSION=$DK_KDE_VERSION \
61 -DENABLE_QTVERSION=$DK_QTVERSION \
62 -Wno-dev
63
64 # NOTE: The order to compile each component here is very important.
65
66 # core KDE frameworks dependencies
67
68 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_extra-cmake-modules
69 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kconfig
70 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_breeze-icons
71 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kcoreaddons
72 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kwindowsystem
73 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_solid
74 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_threadweaver
75 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_karchive
76 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kdbusaddons
77 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_ki18n
78 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kcrash
79 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kcodecs
80 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kguiaddons
81 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kwidgetsaddons
82 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kitemviews
83 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kcompletion
84
85 if [[ $DK_QTVERSION == 6 ]] ; then
86
87 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kcolorscheme
88
89 fi
90
91 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kconfigwidgets
92 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kiconthemes
93 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kservice
94 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kxmlgui
95 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kbookmarks
96 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kimageformats
97
98 # Extra support for digiKam
99
100 # Desktop integration support
101 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_knotifications
102 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kjobwidgets
103 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kio
104 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_knotifyconfig
105
106 # libksane support
107 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_sonnet
108 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_ktextwidgets
109
110 # Calendar support
111 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_kcalendarcore
112
113 # Breeze style support
114 "${CMAKE_BIN}" --build . --parallel --config RelWithDebInfo --target ext_breeze
115
116 TerminateScript