diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-07-24 09:17:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-24 09:17:24 -0700 |
| commit | fd550023b244c7f608a2f7ca6a0fa935c1c1632f (patch) | |
| tree | aed009c060cee1e2762b2ecf9222e18b397744fc | |
| parent | b0c01d91a1aaa980b0bb9e77a617563571343298 (diff) | |
| parent | a92af9b14f37249fbf284613d7679a75d7a3b283 (diff) | |
| download | vcpkg-fd550023b244c7f608a2f7ca6a0fa935c1c1632f.tar.gz vcpkg-fd550023b244c7f608a2f7ca6a0fa935c1c1632f.zip | |
Merge pull request #1511 from atkawa7/libssh
[libssh] init #1454
| -rw-r--r-- | ports/libssh/CONTROL | 4 | ||||
| -rw-r--r-- | ports/libssh/portfile.cmake | 34 |
2 files changed, 38 insertions, 0 deletions
diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL new file mode 100644 index 000000000..284d44091 --- /dev/null +++ b/ports/libssh/CONTROL @@ -0,0 +1,4 @@ +Source: libssh +Version: 0.7.5 +Description:libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side +Build-Depends: zlib, openssl diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake new file mode 100644 index 000000000..8cac84063 --- /dev/null +++ b/ports/libssh/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "WindowsStore not supported") +endif() +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libssh-0.7.5) +vcpkg_download_distfile(ARCHIVE + URLS "https://red.libssh.org/attachments/download/218/libssh-0.7.5.tar.xz" + FILENAME "libssh-0.7.5.tar.xz" + SHA512 6c7f539899caaedf13d66fa2e0fac1a475ecdfe389131abcbdf908bdebc50a0b9e6b0d43e67e52aea85c32f6aa68e46ca2f50695992f82ded83489f445a8e775 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DWITH_STATIC_LIB=ON + +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/libssh") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(INSTALL ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/static ${CURRENT_PACKAGES_DIR}/debug/lib/static) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh RENAME copyright) |
