1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-04-21 21:52:03 +02:00

build.py: add an argument to add client cmake flags

Change-Id: I6b0eae47d4fd52935cc4cef02d79115b80f3d809
This commit is contained in:
Andreas Traczyk 2024-02-12 15:05:44 -05:00
parent f56026439a
commit 7060afe467
2 changed files with 17 additions and 1 deletions

View file

@ -397,6 +397,8 @@ def run_install(args):
install_args.append('-w')
if args.arch:
install_args += ('-a', args.arch)
if args.extra_cmake_flags:
install_args += ('-D', args.extra_cmake_flags)
if args.distribution == OSX_DISTRIBUTION_NAME:
# The `universal_newlines` parameter has been renamed to `text` in
@ -740,6 +742,9 @@ def parse_args():
ap.add_argument('--pywinmake', dest='pywinmake',
default=False, action='store_true',
help='Build Jami for Windows using pywinmake')
# Allow supplying extra congifure flags to the client cmake.
ap.add_argument('--extra-cmake-flags', type=str,
help='Extra flags to pass to the client cmake')
dist = choose_distribution()

View file

@ -29,6 +29,8 @@ export OSTYPE
# -W: disable libwrap and shared library
# -w: do not use Qt WebEngine
# -a: arch to build
# -A: enable AddressSanitizer
# -D: extra CMake flags for the client
set -ex
@ -44,9 +46,10 @@ priv_install=true
enable_libwrap=true
enable_webengine=true
asan=
extra_cmake_flags=''
arch=''
while getopts gsc:dQ:P:p:uWwa:A OPT; do
while getopts gsc:dQ:P:p:uWwa:AD: OPT; do
case "$OPT" in
g)
global='true'
@ -81,6 +84,9 @@ while getopts gsc:dQ:P:p:uWwa:A OPT; do
A)
asan='true'
;;
D)
extra_cmake_flags="${OPTARG}"
;;
\?)
exit 1
;;
@ -220,6 +226,11 @@ else
-DWITH_DAEMON_SUBMODULE=true)
fi
# Add extra flags for the client
if [ -n "${extra_cmake_flags}" ]; then
client_cmake_flags+=(${extra_cmake_flags})
fi
echo "info: Configuring $client client with flags: ${client_cmake_flags[*]}"
cmake .. "${client_cmake_flags[@]}"
make -j"${proc}" V=1