Fix '-L-lcurl' linker warning

This would happen if we don't have a specific directory in LIBSSH2_LIBRARY_DIRS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-07-03 13:47:23 -07:00
parent 7a6cc12da2
commit 60123515b6

View file

@ -31,5 +31,9 @@ else()
if(!LIBCURL_FOUND OR "${LIBCURL_FOUND}" STREQUAL "")
pkg_config_library(LIBCURL libcurl REQUIRED)
endif()
set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -L${LIBSSH2_LIBRARY_DIRS} ${LIBSSH2_LIBRARIES} ${LIBCURL_LIBRARIES} -lcrypto)
if("${LIBSSH2_LIBRARY_DIRS}" STREQUAL "")
set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} ${LIBSSH2_LIBRARIES} ${LIBCURL_LIBRARIES} -lcrypto)
else()
set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -L${LIBSSH2_LIBRARY_DIRS} ${LIBSSH2_LIBRARIES} ${LIBCURL_LIBRARIES} -lcrypto)
endif()
endif()