1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

make lokinet-bootstrap target toggleable

add cmake option to disable building lokinet-bootstrap binary
This commit is contained in:
Jeff Becker 2021-09-10 10:41:42 -04:00
parent dbea1f98e7
commit 7e1236503c
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05
2 changed files with 14 additions and 4 deletions

View file

@ -388,6 +388,7 @@ foreach(curl_arch ${curl_arches})
--disable-progress-meter --without-brotli --with-zlib=${DEPS_DESTDIR} ${curl_ssl_opts}
--without-libmetalink --without-librtmp --disable-versioned-symbols --enable-hidden-symbols
--without-zsh-functions-dir --without-fish-functions-dir
--without-nghttp3 --without-zstd
"CC=${deps_cc}" "CFLAGS=${deps_noarch_CFLAGS}${cflags_extra}" ${curl_extra}
BUILD_COMMAND true
INSTALL_COMMAND ${_make} -C lib install && ${_make} -C include install

View file

@ -1,3 +1,8 @@
if(APPLE)
set(WITH_BOOTSTRAP OFF)
else()
option(WITH_BOOTSTRAP "build lokinet-bootstrap tool" ON)
endif()
add_executable(lokinet-vpn lokinet-vpn.cpp)
if(APPLE)
@ -5,8 +10,12 @@ if(APPLE)
enable_lto(lokinet)
else()
add_executable(lokinet lokinet.cpp)
add_executable(lokinet-bootstrap lokinet-bootstrap.cpp)
enable_lto(lokinet lokinet-vpn lokinet-bootstrap)
if(WITH_BOOTSTRAP)
add_executable(lokinet-bootstrap lokinet-bootstrap.cpp)
enable_lto(lokinet lokinet-vpn lokinet-bootstrap)
else()
enable_lto(lokinet lokinet-vpn)
endif()
endif()
@ -30,7 +39,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
endif()
endif()
if(NOT APPLE)
if(WITH_BOOTSTRAP)
target_link_libraries(lokinet-bootstrap PUBLIC cpr::cpr)
if(NOT WIN32)
find_package(OpenSSL REQUIRED)
@ -40,7 +49,7 @@ if(NOT APPLE)
endif()
set(exetargets lokinet lokinet-vpn)
if(NOT APPLE)
if(WITH_BOOTSTRAP)
list(APPEND exetargets lokinet-bootstrap)
endif()