diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2019-03-19 22:39:53 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-03-21 19:30:14 -0700 |
commit | c1f88ddd6988fa0ef1171a141120a8989de48960 (patch) | |
tree | 12ef36093b78e898eb7422a62639e1ebe97864eb /cmake/Modules/HandleFindGit2.cmake | |
parent | c94e77d3dc282e2599ee12175343f87a1eb3f92d (diff) | |
download | subsurface-c1f88ddd6988fa0ef1171a141120a8989de48960.tar.gz |
CMake: simplify code in HandleFindGit2
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
Diffstat (limited to 'cmake/Modules/HandleFindGit2.cmake')
-rw-r--r-- | cmake/Modules/HandleFindGit2.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmake/Modules/HandleFindGit2.cmake b/cmake/Modules/HandleFindGit2.cmake index 63877c9e1..ee1f1521b 100644 --- a/cmake/Modules/HandleFindGit2.cmake +++ b/cmake/Modules/HandleFindGit2.cmake @@ -16,22 +16,22 @@ else() include_directories(${LIBGIT2_INCLUDE_DIR}) if(FORCE_LIBSSH) find_package(Libssh2 QUIET CONFIG) - if ("${LIBSSH2_VERSION}" STRLESS "1.7" AND "${LIBSSH2_VERSION}" STRGREATER "1.6.1") + if (LIBSSH2_VERSION VERSION_LESS "1.7" AND LIBSSH2_VERSION VERSION_GREATER "1.6.1") set(LIBSSH2_LIBRARIES Libssh2::libssh2) endif() # at least on my Mac I get the mixed case variable instead... if(Libssh2_FOUND) set(LIBSSH2_FOUND ${Libssh2_FOUND}) endif() - if(!LIBSSH2_FOUND OR "${LIBSSH2_FOUND}" STREQUAL "") + if(NOT LIBSSH2_FOUND) pkg_config_library(LIBSSH2 libssh2 REQUIRED) endif() endif() find_package(libcurl QUIET) - if(!LIBCURL_FOUND OR "${LIBCURL_FOUND}" STREQUAL "") + if(NOT LIBCURL_FOUND) pkg_config_library(LIBCURL libcurl REQUIRED) endif() - if("${LIBSSH2_LIBRARY_DIRS}" STREQUAL "") + if(NOT LIBSSH2_LIBRARY_DIRS) 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) |