Repository navigation
Expand file tree
/
Copy pathbootstrap.vcpkg
More file actions
executable file
·91 lines (70 loc) · 2.24 KB
/
Copy pathbootstrap.vcpkg
File metadata and controls
executable file
·91 lines (70 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
# SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier, <caulier dot gilles at gmail dot com>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Arguments : $1 : VCPKG install path (default ./project/mxe/build.win32).
# $2 : build type : 'debugfull' to hack (default), 'release' for production, relwithdebinfo for packaging.
# $3 : Cmake extra configure options.
# Halt and catch errors
set -eE
trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG
trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR
INSTALL_DIR=$1
if [[ $INSTALL_DIR == "" ]]; then
INSTALL_DIR="/e/dk/"
fi
VCPKG_DIR="/c/vcpkg"
VCPKG_TRIPLET="x64-windows"
VCPKG_INSTALL_PREFIX=$INSTALL_DIR/$VCPKG_TRIPLET
BUILD_TYPE=$2
if [[ $BUILD_TYPE == "" ]]; then
BUILD_TYPE=RelWithDebInfo
fi
OPTIONS=$3
echo "Installing to $INSTALL_DIR for target $VCPKG_TRIPLET with build mode $BUILD_TYPE and configure options $OPTIONS"
# Paths rules
ORIG_PATH="$PATH"
export PATH="\
$PATH:\
/c/bison:/c/icoutils/bin:\
$VCPKG_INSTALL_PREFIX/tools/gperf:\
$VCPKG_INSTALL_PREFIX/tools/curl:\
$VCPKG_INSTALL_PREFIX/tools/python3:\
$VCPKG_INSTALL_PREFIX/tools/pkgconf:\
$VCPKG_INSTALL_PREFIX/bin:\
$VCPKG_INSTALL_PREFIX/tools/Qt6/bin\
$VCPKG_INSTALL_PREFIX/tools/qt5/bin\
"
echo "PATH=$PATH"
export PKG_CONFIG_PATH=$VCPKG_INSTALL_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
if [ ! -d "build" ]; then
mkdir build
fi
cd build
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=$VCPKG_TRIPLET \
-DCMAKE_COLOR_MAKEFILE=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_INSTALL_PREFIX=$VCPKG_INSTALL_PREFIX \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DINSTALL_ROOT=$INSTALL_DIR \
-DBUILD_TESTING=OFF \
-DBUILD_WITH_QT6=ON \
-DDIGIKAMSC_COMPILE_PO=OFF \
-DDIGIKAMSC_COMPILE_DIGIKAM=ON \
-DENABLE_KFILEMETADATASUPPORT=OFF \
-DENABLE_AKONADICONTACTSUPPORT=OFF \
-DENABLE_MYSQLSUPPORT=ON \
-DENABLE_INTERNALMYSQL=ON \
-DENABLE_GEOLOCATION=ON \
-DENABLE_MEDIAPLAYER=ON \
-DENABLE_DBUS=OFF \
-DENABLE_KIO=OFF \
-DENABLE_APPSTYLES=ON \
${OPTIONS} \
-Wno-dev
CMAKE_VAL_RET=$?
export PATH=$ORIG_PATH
exit $CMAKE_VAL_RET