2022-02-19 10:18:56 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later AND MIT
|
|
|
|
# Copyright (c) 2022 by The qTox Project Contributors
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
2022-03-07 17:28:13 +08:00
|
|
|
readonly SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
2022-02-19 10:18:56 +08:00
|
|
|
|
2022-03-07 17:28:13 +08:00
|
|
|
source "${SCRIPT_DIR}/build_utils.sh"
|
|
|
|
|
2022-03-16 16:57:39 +08:00
|
|
|
parse_arch --dep "msgpack-c" --supported "win32 win64 macos" "$@"
|
2022-03-07 17:28:13 +08:00
|
|
|
|
|
|
|
"${SCRIPT_DIR}/download/download_msgpack_c.sh"
|
|
|
|
|
|
|
|
cmake .\
|
|
|
|
"-DCMAKE_INSTALL_PREFIX=${DEP_PREFIX}" \
|
2022-02-19 10:18:56 +08:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2022-03-07 17:28:13 +08:00
|
|
|
"${CMAKE_TOOLCHAIN_FILE}" \
|
2022-02-19 10:18:56 +08:00
|
|
|
-DMSGPACK_BUILD_EXAMPLES=OFF \
|
|
|
|
-DMSGPACK_BUILD_TESTS=OFF \
|
2022-03-16 16:57:39 +08:00
|
|
|
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOS_MINIMUM_SUPPORTED_VERSION}" \
|
2022-02-19 10:18:56 +08:00
|
|
|
.
|
|
|
|
|
2022-03-07 17:28:13 +08:00
|
|
|
make -j "${MAKE_JOBS}"
|
2022-02-19 10:18:56 +08:00
|
|
|
make install
|