Merge pull request #759 from SlavSlavov/patch-1

Update Findsodium.cmake
This commit is contained in:
Frank Denis 2018-09-27 06:59:25 +02:00 committed by GitHub
commit 350a23ae5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,16 +55,16 @@ if (UNIX)
endif() endif()
if(sodium_USE_STATIC_LIBS) if(sodium_USE_STATIC_LIBS)
foreach(_libname ${sodium_PKG_STATIC_LIBRARIES}) if (sodium_PKG_STATIC_LIBRARIES STREQUAL)
if (NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending with .a foreach(_libname ${sodium_PKG_STATIC_LIBRARIES})
list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a") if (NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending with .a
endif() list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a")
endforeach() endif()
list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES) endforeach()
list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES)
# if pkgconfig for libsodium doesn't provide else()
# static lib info, then override PKG_STATIC here.. # if pkgconfig for libsodium doesn't provide
if (sodium_PKG_STATIC_LIBRARIES STREQUAL "") # static lib info, then override PKG_STATIC here..
set(sodium_PKG_STATIC_LIBRARIES libsodium.a) set(sodium_PKG_STATIC_LIBRARIES libsodium.a)
endif() endif()