diff --git a/CMakeLists.txt b/CMakeLists.txt index 73b983e..98850a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.11.4) # IMPORTANT: updating version might require update in package dependencies at the end of this file. -set(KAFE_VERSION "1.1.2") +set(KAFE_VERSION "1.1.3") set(KAFE_SOVERSION "1.1") set(KAFE_VERSION_INT 11) set(KAFE_VERSION_DEP_NEXT_MAJOR "2.0.0") diff --git a/cmake/Modules/FindLIBSSH.cmake b/cmake/Modules/FindLIBSSH.cmake index 97d1c2d..5533bcc 100644 --- a/cmake/Modules/FindLIBSSH.cmake +++ b/cmake/Modules/FindLIBSSH.cmake @@ -55,15 +55,23 @@ else () ${LIBSSH_LIBRARY} ) - file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MAJOR + if(EXISTS "${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h") + set(LIBSSH_VERSION_FILE "${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h") + else() + set(LIBSSH_VERSION_FILE "${LIBSSH_INCLUDE_DIR}/libssh/libssh.h") + endif() + + + file(STRINGS ${LIBSSH_VERSION_FILE} LIBSSH_VERSION_MAJOR REGEX "#define[ ]+LIBSSH_VERSION_MAJOR[ ]+[0-9]+") + # Older versions of libssh like libssh-0.2 have LIBSSH_VERSION but not LIBSSH_VERSION_MAJOR if (LIBSSH_VERSION_MAJOR) string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MAJOR ${LIBSSH_VERSION_MAJOR}) - file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MINOR + file(STRINGS ${LIBSSH_VERSION_FILE} LIBSSH_VERSION_MINOR REGEX "#define[ ]+LIBSSH_VERSION_MINOR[ ]+[0-9]+") string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MINOR ${LIBSSH_VERSION_MINOR}) - file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_PATCH + file(STRINGS ${LIBSSH_VERSION_FILE} LIBSSH_VERSION_PATCH REGEX "#define[ ]+LIBSSH_VERSION_MICRO[ ]+[0-9]+") string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_PATCH ${LIBSSH_VERSION_PATCH}) set(LIBSSH_VERSION ${LIBSSH_VERSION_MAJOR}.${LIBSSH_VERSION_MINOR}.${LIBSSH_VERSION_PATCH}) diff --git a/libkafe/src/io/archive.cpp b/libkafe/src/io/archive.cpp index ae94a44..7ccee55 100644 --- a/libkafe/src/io/archive.cpp +++ b/libkafe/src/io/archive.cpp @@ -30,6 +30,13 @@ using namespace std; using namespace kafe; using namespace kafe::runtime; +/** + * MACOS has no EXTMATCH! + */ +#ifndef FNM_EXTMATCH +#define FNM_EXTMATCH 0 +#endif + namespace kafe::io { static const int ARCHIVE_FILE_BUFFER_S = 4096;