diff options
| author | thothothotho <fdejaeger@novaquark.com> | 2020-06-02 00:59:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-01 15:59:58 -0700 |
| commit | fdff19f9a1bccd42bbe6e520d80f87ec680f4f3b (patch) | |
| tree | abec2d356a2de050464910bd6ac9c68b1090d450 | |
| parent | c6414b172a435068a54474136d92578a3e979f12 (diff) | |
| download | vcpkg-fdff19f9a1bccd42bbe6e520d80f87ec680f4f3b.tar.gz vcpkg-fdff19f9a1bccd42bbe6e520d80f87ec680f4f3b.zip | |
[nghttp2] Fix to build nghttp2 statically (#11638)
* fix to build nghttp2 statically.
* review.
| -rw-r--r-- | ports/nghttp2/CONTROL | 2 | ||||
| -rw-r--r-- | ports/nghttp2/portfile.cmake | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/ports/nghttp2/CONTROL b/ports/nghttp2/CONTROL index 0f0fa2475..6afd6f83b 100644 --- a/ports/nghttp2/CONTROL +++ b/ports/nghttp2/CONTROL @@ -1,4 +1,4 @@ Source: nghttp2 -Version: 1.39.2-1 +Version: 1.39.2-2 Homepage: https://github.com/nghttp2/nghttp2 Description: Implementation of the Hypertext Transfer Protocol version 2 in C diff --git a/ports/nghttp2/portfile.cmake b/ports/nghttp2/portfile.cmake index e92925312..c7b5a5388 100644 --- a/ports/nghttp2/portfile.cmake +++ b/ports/nghttp2/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(LIB_NAME nghttp2) set(LIB_VERSION 1.39.2) @@ -13,12 +11,22 @@ vcpkg_from_github( HEAD_REF master ) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(ENABLE_STATIC_LIB ON) + set(ENABLE_SHARED_LIB OFF) +else() + set(ENABLE_STATIC_LIB OFF) + set(ENABLE_SHARED_LIB ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DENABLE_LIB_ONLY=ON -DENABLE_ASIO_LIB=OFF + -DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB} + -DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB} ) vcpkg_install_cmake() @@ -32,6 +40,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() |
