split up link order for oxenmq and oxenc

* lokinet uberlib needs oxenc and oxenmq
* lokinet-util only needs oxenc

fixes #1911
pull/1912/head
Jeff 2 years ago
parent bad98b5476
commit 9556741f6a
No known key found for this signature in database
GPG Key ID: 025C02EE3A092F2D

@ -199,6 +199,7 @@ if(OXENC_FOUND)
else() else()
message(STATUS "using oxen-encoding submodule") message(STATUS "using oxen-encoding submodule")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/oxen-encoding) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/oxen-encoding)
add_library(oxenc::oxenc ALIAS oxenc)
endif() endif()
option(FORCE_OXENMQ_SUBMODULE "force using oxenmq submodule" OFF) option(FORCE_OXENMQ_SUBMODULE "force using oxenmq submodule" OFF)

@ -34,7 +34,7 @@ target_link_libraries(lokinet-util PUBLIC
nlohmann_json::nlohmann_json nlohmann_json::nlohmann_json
filesystem filesystem
date::date date::date
oxenmq::oxenmq oxenc::oxenc
) )
if(ANDROID) if(ANDROID)
@ -59,7 +59,7 @@ add_library(lokinet-platform
) )
target_link_libraries(lokinet-platform PUBLIC lokinet-cryptography lokinet-util Threads::Threads base_libs uvw) target_link_libraries(lokinet-platform PUBLIC lokinet-cryptography lokinet-util Threads::Threads base_libs uvw)
target_link_libraries(lokinet-platform PRIVATE oxenmq::oxenmq)
if (ANDROID) if (ANDROID)
target_sources(lokinet-platform PRIVATE android/ifaddrs.c) target_sources(lokinet-platform PRIVATE android/ifaddrs.c)
@ -242,7 +242,7 @@ if(WITH_HIVE)
) )
endif() endif()
target_link_libraries(liblokinet PUBLIC cxxopts lokinet-platform lokinet-util lokinet-cryptography sqlite_orm ngtcp2_static) target_link_libraries(liblokinet PUBLIC cxxopts oxenc::oxenc lokinet-platform lokinet-util lokinet-cryptography sqlite_orm ngtcp2_static oxenmq::oxenmq)
target_link_libraries(liblokinet PRIVATE libunbound) target_link_libraries(liblokinet PRIVATE libunbound)
pkg_check_modules(CRYPT libcrypt IMPORTED_TARGET) pkg_check_modules(CRYPT libcrypt IMPORTED_TARGET)
if(CRYPT_FOUND AND NOT CMAKE_CROSSCOMPILING) if(CRYPT_FOUND AND NOT CMAKE_CROSSCOMPILING)

Loading…
Cancel
Save