mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Cmake: make libssh2 library path explicit
Under certain conditions on my Mac the build process will happily find libssh2 but then at link time can't figure out where it is. Making the path to the library explicit seems to fix that issue. This commit also adds the code to dump all visible variables at the end of the cmake file (commented out). I have looked this up online, added it to address an issue, and then removed it quite a few times... I figure I might as well keep it there for the next time I need it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8b4d502f24
commit
332cc0a418
1 changed files with 6 additions and 2 deletions
|
@ -86,7 +86,7 @@ else()
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_LIBGIT23_API")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LIBGIT23_API")
|
||||
if(FORCE_LIBSSH)
|
||||
find_package(Libssh2 QUIET CONFIG)
|
||||
find_package(Libssh2 QUIET CONFIG)
|
||||
if ("${LIBSSH2_VERSION}" STRGREATER "1.6.1")
|
||||
set(LIBSSH2_LIBRARIES Libssh2::libssh2)
|
||||
endif()
|
||||
|
@ -98,7 +98,7 @@ else()
|
|||
if(!LIBCURL_FOUND OR "${LIBCURL_FOUND}" STREQUAL "")
|
||||
pkg_config_library(LIBCURL libcurl REQUIRED)
|
||||
endif()
|
||||
set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} ${LIBSSH2_LIBRARIES} ${LIBCURL_LIBRARIES})
|
||||
set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -L${LIBSSH2_LIBRARY_DIRS} ${LIBSSH2_LIBRARIES} ${LIBCURL_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -813,3 +813,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|||
)
|
||||
endif()
|
||||
endif()
|
||||
# get_cmake_property(_variableNames VARIABLES)
|
||||
# foreach (_variableName ${_variableNames})
|
||||
# message(STATUS "${_variableName}=${${_variableName}}")
|
||||
# endforeach()
|
||||
|
|
Loading…
Reference in a new issue