This fixes installation in ucrt and clang environments. The cmake files are now modified with sed command to add _IMPORT_PREFIX replacing full mingw prefix path.
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
diff -Naur libssh-0.8.1.orig/CMakeLists.txt libssh-0.8.1/CMakeLists.txt
|
|
--- libssh-0.8.1.orig/CMakeLists.txt 2018-08-21 08:30:18.377098700 -0400
|
|
+++ libssh-0.8.1/CMakeLists.txt 2018-08-21 08:37:16.760077700 -0400
|
|
@@ -111,8 +111,8 @@
|
|
add_subdirectory(src)
|
|
|
|
# pkg-config file
|
|
-if (UNIX)
|
|
-configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc)
|
|
+if (UNIX OR MINGW)
|
|
+configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc @ONLY)
|
|
install(
|
|
FILES
|
|
${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
|
|
@@ -121,7 +121,7 @@
|
|
COMPONENT
|
|
pkgconfig
|
|
)
|
|
-endif (UNIX)
|
|
+endif (UNIX OR MINGW)
|
|
|
|
# CMake config files
|
|
include(CMakePackageConfigHelpers)
|
|
diff -Naur libssh-0.8.1.orig/libssh.pc.cmake libssh-0.8.1/libssh.pc.cmake
|
|
--- libssh-0.8.1.orig/libssh.pc.cmake 2018-08-21 08:30:18.361515500 -0400
|
|
+++ libssh-0.8.1/libssh.pc.cmake 2018-08-21 08:37:17.353829600 -0400
|
|
@@ -1,6 +1,11 @@
|
|
-Name: ${PROJECT_NAME}
|
|
+prefix=@CMAKE_INSTALL_PREFIX@
|
|
+exec_prefix=${prefix}/bin
|
|
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
|
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
|
+
|
|
+Name: @PROJECT_NAME@
|
|
Description: The SSH Library
|
|
-Version: ${PROJECT_VERSION}
|
|
-Libs: -L${CMAKE_INSTALL_FULL_LIBDIR} -lssh
|
|
-Cflags: -I${CMAKE_INSTALL_FULL_INCLUDEDIR}
|
|
+Version: @PROJECT_VERSION@
|
|
+Libs: -L${libdir} -lssh
|
|
+Cflags: -I${includedir}
|
|
|