mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 23:48:59 +08:00
f7175a73c0
* Update libssh to 0.10.4 * run x-add-version * add license and remove port * correct license * run x-add-version * Fix version database. Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 7bc3331..5c7275d 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -124,8 +124,28 @@ add_subdirectory(include)
|
|
add_subdirectory(src)
|
|
|
|
# pkg-config file
|
|
-if (UNIX OR MINGW)
|
|
configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc)
|
|
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "Requires:")
|
|
+ if (WITH_ZLIB)
|
|
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " zlib")
|
|
+ endif ()
|
|
+ if (WITH_GCRYPT)
|
|
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "\nLibs.private: -lgcrypt")
|
|
+ elseif (WITH_MBEDTLS)
|
|
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "\nLibs.private: -lmbedcrypto -lpthread")
|
|
+ else ()
|
|
+ if (WIN32)
|
|
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "\nLibs.private: -llibcrypto -lUser32 -lCrypt32")
|
|
+ else ()
|
|
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " libcrypto\nLibs.private:")
|
|
+ endif ()
|
|
+ endif ()
|
|
+ if (CMAKE_USE_PTHREADS_INIT)
|
|
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " -lpthread")
|
|
+ endif ()
|
|
+ if (WIN32)
|
|
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " -lws2_32 -lShell32 -lAdvapi32")
|
|
+ endif ()
|
|
install(
|
|
FILES
|
|
${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
|
|
@@ -134,7 +154,6 @@ install(
|
|
COMPONENT
|
|
pkgconfig
|
|
)
|
|
-endif (UNIX OR MINGW)
|
|
|
|
# CMake config files
|
|
include(CMakePackageConfigHelpers)
|