Skip to content

Commit

Permalink
build BUGFIX libssh search fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Feb 4, 2020
1 parent a3c7076 commit 47c8efb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ endif()
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS ON)
add_compile_options(-Wall -Wextra -fvisibility=hidden)
#TODO add_compile_options(-Wpedantic)


set(CMAKE_C_FLAGS_PACKAGE "-g -O2 -DNDEBUG")

# Version of the project
Expand Down Expand Up @@ -231,8 +228,8 @@ endif()

# dependencies - libssh
if(ENABLE_SSH)
option(LIBSSH_FIND_VERSION "check version too" ON)
find_package(LibSSH 0.7.0 REQUIRED)
set(LIBSSH_FIND_VERSION 0.7.0)
find_package(LibSSH REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNC_ENABLED_SSH")
message(STATUS "LibSSH version ${LIBSSH_VERSION} found")

Expand Down
3 changes: 0 additions & 3 deletions CMakeModules/FindLibSSH.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@ else()

if(LIBSSH_INCLUDE_DIR AND LIBSSH_LIBRARY)
set(LIBSSH_FOUND TRUE)
message(STATUS "LIBSSH Found: ${LIBSSH_LIBRARY}")
endif()

set(LIBSSH_INCLUDE_DIRS ${LIBSSH_INCLUDE_DIR})
message(STATUS "LIBSSH_INCLUDE_DIR: ${LIBSSH_INCLUDE_DIR}")

if(LIBSSH_FOUND)
string(REPLACE "libssh.so" ""
Expand All @@ -83,7 +81,6 @@ else()
LIBSSH_LIBRARY_DIR
${LIBSSH_LIBRARY_DIR}
)
message(STATUS "LIBSSH_LIBRARY_DIR: ${LIBSSH_LIBRARY_DIR}")

if(LIBSSH_FIND_VERSION)
file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MAJOR
Expand Down

0 comments on commit 47c8efb

Please sign in to comment.