mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Add option to build tox-bootstrapd
When cross-compiling to <target> from Linux, cmake might find native Linux libconfig and decide to build tox-bootstrapd. If the target is Windows, this will fail, as tox-bootstrapd can't be built for Windows in the first place. If the target is Linux of some other architecture, then using host native libconfig will fail too. Thus an option is needed to guard against this.
This commit is contained in:
parent
90123c803a
commit
02e9cd38f1
|
@ -304,7 +304,12 @@ add_c_executable(DHT_bootstrap
|
||||||
other/bootstrap_node_packets.c)
|
other/bootstrap_node_packets.c)
|
||||||
target_link_modules(DHT_bootstrap toxnetcrypto)
|
target_link_modules(DHT_bootstrap toxnetcrypto)
|
||||||
|
|
||||||
if(LIBCONFIG_FOUND)
|
option(BOOTSTRAP_DAEMON "Enable building of tox-bootstrapd" ON)
|
||||||
|
if(BOOTSTRAP_DAEMON)
|
||||||
|
if(WIN32)
|
||||||
|
message(FATAL_ERROR "Building tox-bootstrapd for Windows is not supported")
|
||||||
|
endif()
|
||||||
|
if(LIBCONFIG_FOUND)
|
||||||
add_c_executable(tox-bootstrapd
|
add_c_executable(tox-bootstrapd
|
||||||
other/bootstrap_daemon/src/command_line_arguments.c
|
other/bootstrap_daemon/src/command_line_arguments.c
|
||||||
other/bootstrap_daemon/src/command_line_arguments.h
|
other/bootstrap_daemon/src/command_line_arguments.h
|
||||||
|
@ -318,6 +323,7 @@ if(LIBCONFIG_FOUND)
|
||||||
other/bootstrap_node_packets.c
|
other/bootstrap_node_packets.c
|
||||||
other/bootstrap_node_packets.h)
|
other/bootstrap_node_packets.h)
|
||||||
target_link_modules(tox-bootstrapd toxnetcrypto ${LIBCONFIG_LIBRARIES})
|
target_link_modules(tox-bootstrapd toxnetcrypto ${LIBCONFIG_LIBRARIES})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CMAKE=cmake
|
CMAKE=cmake
|
||||||
|
CMAKE_EXTRA_FLAGS=""
|
||||||
NPROC=`nproc`
|
NPROC=`nproc`
|
||||||
CURDIR=$PWD
|
CURDIR=$PWD
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CMAKE=cmake
|
CMAKE=cmake
|
||||||
|
CMAKE_EXTRA_FLAGS=""
|
||||||
NPROC=`sysctl -n hw.ncpu`
|
NPROC=`sysctl -n hw.ncpu`
|
||||||
CURDIR=$PWD
|
CURDIR=$PWD
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CMAKE=$ARCH-w64-mingw32.shared-cmake
|
CMAKE=$ARCH-w64-mingw32.shared-cmake
|
||||||
|
CMAKE_EXTRA_FLAGS="-DBOOTSTRAP_DAEMON=OFF"
|
||||||
NPROC=`nproc`
|
NPROC=`nproc`
|
||||||
CURDIR=/work
|
CURDIR=/work
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,8 @@ RUN $CMAKE \
|
||||||
-DDEBUG=ON \
|
-DDEBUG=ON \
|
||||||
-DASSOC_DHT=ON \
|
-DASSOC_DHT=ON \
|
||||||
-DSTRICT_ABI=ON \
|
-DSTRICT_ABI=ON \
|
||||||
-DTEST_TIMEOUT_SECONDS=300 #-DASAN=ON
|
-DTEST_TIMEOUT_SECONDS=300 \
|
||||||
|
$CMAKE_EXTRA_FLAGS #-DASAN=ON
|
||||||
|
|
||||||
export CTEST_OUTPUT_ON_FAILURE=1
|
export CTEST_OUTPUT_ON_FAILURE=1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user