diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-03-13 05:09:32 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-03-13 05:09:32 -0700 |
| commit | ab09c4a277737b2486190e7a089055e9ad22610d (patch) | |
| tree | e9f684e8b070b43837e7b1eae8a3d9507710ebc3 | |
| parent | 81b9ab1291bd322b5de8ad0cec2f21ce4d828a28 (diff) | |
| download | vcpkg-ab09c4a277737b2486190e7a089055e9ad22610d.tar.gz vcpkg-ab09c4a277737b2486190e7a089055e9ad22610d.zip | |
[libssh] Bake in LIBSSH_STATIC
| -rw-r--r-- | ports/libssh/CONTROL | 4 | ||||
| -rw-r--r-- | ports/libssh/portfile.cmake | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL index 9ae256937..692a6f4b8 100644 --- a/ports/libssh/CONTROL +++ b/ports/libssh/CONTROL @@ -1,4 +1,4 @@ Source: libssh -Version: 0.7.5-1 -Description:libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side +Version: 0.7.5-2 +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 index 8cac84063..36ece7321 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -15,20 +15,25 @@ 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(RENAME ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/lib/ssh.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/debug/lib/ssh.lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + + file(READ ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h _contents) + string(REPLACE "#ifdef LIBSSH_STATIC" "#if 1" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h "${_contents}") endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/static ${CURRENT_PACKAGES_DIR}/debug/lib/static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# The installed cmake config files are nonfunctional (0.7.5) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake ${CURRENT_PACKAGES_DIR}/cmake) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh RENAME copyright) |
