-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdevconfig
More file actions
executable file
·56 lines (51 loc) · 1.81 KB
/
devconfig
File metadata and controls
executable file
·56 lines (51 loc) · 1.81 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
#!/usr/bin/env bash
#
# Copyright 2026 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# use Homebrew-installed OpenSSL on macOS if available
EXTRA_FLAGS=()
BREW_OPENSSL="$(brew --prefix openssl 2>/dev/null)"
if [ "$BREW_OPENSSL" ]; then
EXTRA_FLAGS[${#EXTRA_FLAGS[@]}]="-DOPENSSL_ROOT_DIR=$BREW_OPENSSL"
fi
rm -f CMakeCache.txt
rm -rf CMakeFiles
cmake -D WITH_EXTRA_WARNINGS=ON \
-D WITH_SOCKET_LOG=ON \
-D WITH_INTERNAL_TRACE=ON \
-D WITH_OPENSSL=ON \
-D WITH_MBEDTLS=ON \
-D WITH_TINYDTLS=ON \
-D WITH_TEST=ON \
-D WITH_AVS_CRYPTO_ADVANCED_FEATURES=ON \
-D WITH_VALGRIND=ON \
-D CMAKE_C_FLAGS="-g -Werror=implicit-function-declaration" \
-D CMAKE_INSTALL_PREFIX:PATH=/tmp \
"${EXTRA_FLAGS[@]}" \
"$@" -H"$(dirname "$0")" -B. &&
make clean
# ensure venv is used
VENV_DIR="${VENV_DIR:-venv}"
if python3 -c 'import sys; exit(0) if sys.base_prefix != sys.prefix else exit(1)'; then
echo "Using already activated Python venv"
else
if [ ! -d "${VENV_DIR}" ]; then
echo "Creating Python venv in ${VENV_DIR}"
python3 -m venv "${VENV_DIR}"
fi
echo "Activating Python venv in ${VENV_DIR}"
source "${VENV_DIR}/bin/activate"
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
fi