Allow manually setting dependency libsodium paths
This commit is contained in:
parent
136c8b21a5
commit
ed20c28ed0
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ endif()
|
|||
|
||||
if(UDPC_DISABLE_LIBSODIUM)
|
||||
message(STATUS "libsodium disabled")
|
||||
elseif(DEFINED LIBSODIUM_LIBRARIES AND DEFINED LIBSODIUM_INCLUDE_DIRS)
|
||||
message(STATUS "libsodium manual paths detected, using them")
|
||||
target_compile_definitions(UDPC PUBLIC UDPC_LIBSODIUM_ENABLED)
|
||||
target_link_libraries(UDPC PUBLIC ${LIBSODIUM_LIBRARIES})
|
||||
target_include_directories(UDPC PUBLIC ${LIBSODIUM_INCLUDE_DIRS})
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBSODIUM QUIET libsodium)
|
||||
|
|
Loading…
Reference in a new issue