mirror of https://github.com/oxen-io/oxen-core.git
Remove unbound submodule
There's really no reason to submodule it - we work with pretty much any libunbound version, and it's a very commonly available library (comparable to sqlite3 or boost, which we don't submodule). This removes the submodule and switches it to a hard dependency.
This commit is contained in:
parent
fdf65677eb
commit
f4e9ea7d40
|
@ -1,7 +1,3 @@
|
|||
[submodule "external/unbound"]
|
||||
path = external/unbound
|
||||
url = https://github.com/monero-project/unbound
|
||||
branch = monero
|
||||
[submodule "external/miniupnp"]
|
||||
path = external/miniupnp
|
||||
url = https://github.com/monero-project/miniupnp
|
||||
|
|
|
@ -239,7 +239,6 @@ if(NOT MANUAL_SUBMODULES)
|
|||
|
||||
message(STATUS "Checking submodules")
|
||||
check_submodule(external/miniupnp)
|
||||
check_submodule(external/unbound)
|
||||
check_submodule(external/rapidjson)
|
||||
check_submodule(external/trezor-common)
|
||||
check_submodule(external/randomx)
|
||||
|
@ -271,17 +270,6 @@ message(STATUS "BOOST_IGNORE_SYSTEM_PATHS defaults to ${BOOST_IGNORE_SYSTEM_PATH
|
|||
option(BOOST_IGNORE_SYSTEM_PATHS "Ignore boost system paths for local boost installation" ${BOOST_IGNORE_SYSTEM_PATHS_DEFAULT})
|
||||
|
||||
|
||||
if (NOT DEFINED ENV{DEVELOPER_LIBUNBOUND_OLD})
|
||||
message(STATUS "Could not find DEVELOPER_LIBUNBOUND_OLD in env (not required)")
|
||||
elseif ("$ENV{DEVELOPER_LIBUNBOUND_OLD}" EQUAL 1)
|
||||
message(STATUS "Found: env DEVELOPER_LIBUNBOUND_OLD = 1, will use the work around")
|
||||
add_definitions(-DDEVELOPER_LIBUNBOUND_OLD)
|
||||
elseif ("$ENV{DEVELOPER_LIBUNBOUND_OLD}" EQUAL 0)
|
||||
message(STATUS "Found: env DEVELOPER_LIBUNBOUND_OLD = 0")
|
||||
else()
|
||||
message(STATUS "Found: env DEVELOPER_LIBUNBOUND_OLD with bad value. Will NOT use the work around")
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Check whether we're on a 32-bit or 64-bit system
|
||||
|
@ -421,7 +409,6 @@ add_definition_if_function_found(strptime HAVE_STRPTIME)
|
|||
# lrelease and lupdate binaries from the host
|
||||
add_subdirectory(translations)
|
||||
|
||||
add_library(libunbound INTERFACE)
|
||||
add_library(miniupnpc INTERFACE)
|
||||
add_library(systemd INTERFACE) # Will do nothing unless we find and enable systemd support
|
||||
|
||||
|
@ -444,6 +431,11 @@ else()
|
|||
target_link_libraries(sodium INTERFACE sodium_vendor)
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(UNBOUND unbound REQUIRED IMPORTED_TARGET)
|
||||
add_library(libunbound INTERFACE)
|
||||
target_link_libraries(libunbound PkgConfig::UNBOUND)
|
||||
|
||||
export(TARGETS sodium NAMESPACE sodium:: FILE sodium-exports.cmake)
|
||||
install(TARGETS sodium EXPORT sodiumConfig DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
|
@ -981,10 +973,6 @@ endif()
|
|||
# when ON - will install libwallet_merged into "lib"
|
||||
option(BUILD_GUI_DEPS "Build GUI dependencies." OFF)
|
||||
|
||||
# This is not nice, distribution packagers should not enable this, but depend
|
||||
# on libunbound shipped with their distribution instead
|
||||
option(INSTALL_VENDORED_LIBUNBOUND "Install libunbound binary built from source vendored with this repo." OFF)
|
||||
|
||||
CHECK_C_COMPILER_FLAG(-std=c11 HAVE_C11)
|
||||
find_package(PythonInterp)
|
||||
find_program(iwyu_tool_path NAMES iwyu_tool.py iwyu_tool)
|
||||
|
|
|
@ -52,7 +52,7 @@ library archives (`.a`).
|
|||
| OpenPGM | ? | NO | `libpgm-dev` | `libpgm` | `openpgm-devel` | NO | For ZeroMQ |
|
||||
| sqlite3 | ? | YES | `libsqlite3-dev` | `sqlite` | `sqlite-devel` | NO | Loki Name System |
|
||||
| libnorm[2] | ? | NO | `libnorm-dev` | | ` | YES | For ZeroMQ |
|
||||
| libunbound | 1.4.16 | YES | `libunbound-dev` | `unbound` | `unbound-devel` | NO | DNS resolver |
|
||||
| libunbound | 1.4.16 | NO | `libunbound-dev` | `unbound` | `unbound-devel` | NO | DNS resolver |
|
||||
| libsodium | ? | NO | `libsodium-dev` | `libsodium` | `libsodium-devel` | NO | cryptography |
|
||||
| libunwind | any | NO | `libunwind8-dev` | `libunwind` | `libunwind-devel` | YES | Stack traces |
|
||||
| liblzma | any | NO | `liblzma-dev` | `xz` | `xz-devel` | YES | For libunwind |
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
|
||||
# This is broken up into two parts: first we check for miniupnp, compile it if we can't
|
||||
# find it, and thereafter we check for libunbound, and compile it if we can't find it.
|
||||
# We always compile if we are building statically to reduce static dependency issues...
|
||||
# ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with
|
||||
# others.
|
||||
|
@ -39,7 +37,6 @@ find_package(PkgConfig REQUIRED)
|
|||
|
||||
if(NOT STATIC)
|
||||
pkg_check_modules(MINIUPNPC miniupnpc>=2.1)
|
||||
pkg_check_modules(UNBOUND libunbound)
|
||||
pkg_check_modules(LOKIMQ liblokimq>=1.1.4)
|
||||
endif()
|
||||
|
||||
|
@ -63,33 +60,6 @@ else()
|
|||
endif()
|
||||
|
||||
|
||||
if(NOT UNBOUND_FOUND)
|
||||
# NOTE: If STATIC is true, CMAKE_FIND_LIBRARY_SUFFIXES has been reordered.
|
||||
# unbound has config tests which used OpenSSL libraries, so -ldl may need to
|
||||
# be set in this case.
|
||||
# The unbound CMakeLists.txt can set it, since it's also needed for the
|
||||
# static OpenSSL libraries set up there after with target_link_libraries.
|
||||
message(STATUS "Using in-tree unbound")
|
||||
if(STATIC AND NOT IOS)
|
||||
if(UNIX)
|
||||
set(OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES};${CMAKE_DL_LIBS};${CMAKE_THREAD_LIBS_INIT}")
|
||||
elseif(MINGW)
|
||||
set(OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES};extra")
|
||||
endif()
|
||||
endif()
|
||||
add_subdirectory(unbound)
|
||||
target_link_libraries(libunbound INTERFACE unbound)
|
||||
target_include_directories(libunbound INTERFACE unbound/libunbound)
|
||||
else()
|
||||
message(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIRS}")
|
||||
if(NOT UNBOUND_LIBRARIES)
|
||||
message(FATAL_ERROR "Found libunbound includes, but could not find libunbound library. Please make sure you have installed libunbound or libunbound-dev or the equivalent")
|
||||
endif()
|
||||
|
||||
link_dep_libs(libunbound INTERFACE "${UNBOUND_LIBRARY_DIRS}" ${UNBOUND_LIBRARIES})
|
||||
target_include_directories(libunbound INTERFACE ${UNBOUND_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(NOT LOKIMQ_FOUND)
|
||||
message(STATUS "Using in-tree lokimq")
|
||||
if (DEPENDS)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 7f23967954736dcaa366806b9eaba7e2bdfede11
|
Loading…
Reference in New Issue