Update CMakeLists.txt

This commit is contained in:
Lee *!* Clagett 2024-02-26 10:57:16 -05:00 committed by GitHub
parent f9fb85b8e2
commit f7fd74ff59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,7 +116,7 @@ load_cache(${MONERO_BUILD_DIR} READ_WITH_PREFIX monero_
OPENSSL_INCLUDE_DIR
OPENSSL_CRYPTO_LIBRARY
OPENSSL_SSL_LIBRARY
SODIUM_LIBRARY
sodium_LIBRARY_RELEASE
UNBOUND_LIBRARIES
ZMQ_INCLUDE_PATH
ZMQ_LIB
@ -191,10 +191,8 @@ endif()
if(monero_PROTOLIB_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${monero_PROTOLIB_LIBRARY}")
endif()
if(NOT monero_SODIUM_LIBRARY)
message(FATAL_ERROR "Could not find Sodium Library")
else ()
set(ZMQ_LIB "${ZMQ_LIB};${monero_SODIUM_LIBRARY}")
if(NOT monero_SODIUM_LIBRARY_RELESAE)
set(ZMQ_LIB "${ZMQ_LIB};${monero_SODIUM_LIBRARY_RELEASE}")
endif()
if(STATIC AND NOT IOS)
@ -214,7 +212,6 @@ foreach (LIB ${MONERO_LIBRARIES})
else ()
set(LIB_NAME "monero::${LIB}")
add_library(${LIB_NAME} STATIC IMPORTED)
target_link_libraries(${LIB_NAME} PUBLIC ${monero_SODIUM_LIBRARY})
set_target_properties(${LIB_NAME} PROPERTIES IMPORTED_LOCATION ${LIB_PATH})
list(APPEND IMPORTED_MONERO_LIBRARIES "${LIB_NAME}")
endif()
@ -254,7 +251,7 @@ set_property(TARGET monero::libraries PROPERTY
${monero_LIBUDEV_LIBRARY}
${monero_OPENSSL_SSL_LIBRARY}
${monero_OPENSSL_CRYPTO_LIBRARY}
${monero_SODIUM_LIBRARY}
${monero_SODIUM_LIBRARY_RELEASE}
${monero_UNBOUND_LIBRARIES}
${CMAKE_DL_LIBS}
)