diff options
| author | Griffin Downs <35574547+grdowns@users.noreply.github.com> | 2019-07-02 13:58:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-02 13:58:45 -0700 |
| commit | 1628ebbaa4a33a43bffab74853dce20c15fa5a3e (patch) | |
| tree | 7733b88dfb642f380db4846ea7dd42ffb2204d11 | |
| parent | 8ca8de6926bc67ccc71f4b3f4733ce2f1d3b0547 (diff) | |
| parent | 0b9cf040bafa0a8ed064e47459779d72fcf9b9c4 (diff) | |
| download | vcpkg-1628ebbaa4a33a43bffab74853dce20c15fa5a3e.tar.gz vcpkg-1628ebbaa4a33a43bffab74853dce20c15fa5a3e.zip | |
Merge pull request #6512 from lebdron/openssl-unix-dynamic
[openssl-unix] Shared library support
| -rw-r--r-- | ports/openssl-unix/CMakeLists.txt | 22 | ||||
| -rw-r--r-- | ports/openssl-unix/CONTROL | 2 |
2 files changed, 21 insertions, 3 deletions
diff --git a/ports/openssl-unix/CMakeLists.txt b/ports/openssl-unix/CMakeLists.txt index e8d916392..f9d94b1a2 100644 --- a/ports/openssl-unix/CMakeLists.txt +++ b/ports/openssl-unix/CMakeLists.txt @@ -76,9 +76,27 @@ file(WRITE "${BUILDDIR}/Configure" "${_contents}") if(BUILD_SHARED_LIBS)
set(SHARED shared)
+ file(STRINGS "${BUILDDIR}/crypto/opensslv.h" SHLIB_VERSION
+ REGEX "^#[\t ]*define[\t ]+SHLIB_VERSION_NUMBER[\t ]+\".*\".*")
+ string(REGEX REPLACE "^.*SHLIB_VERSION_NUMBER[\t ]+\"([^\"]*)\".*$" "\\1"
+ SHLIB_VERSION "${SHLIB_VERSION}")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ set(LIB_EXT dylib)
+ set(LIB_EXTS ${SHLIB_VERSION}.${LIB_EXT})
+ else()
+ set(LIB_EXT so)
+ set(LIB_EXTS ${LIB_EXT}.${SHLIB_VERSION})
+ endif()
+ list(APPEND LIB_EXTS ${LIB_EXT})
else()
set(SHARED no-shared)
+ set(LIB_EXTS a)
endif()
+foreach(lib ssl crypto)
+ foreach(ext ${LIB_EXTS})
+ list(APPEND INSTALL_LIBS "${BUILDDIR}/lib${lib}.${ext}")
+ endforeach()
+endforeach()
if(CMAKE_HOST_WIN32)
set(ENV_COMMAND set)
@@ -130,10 +148,10 @@ add_custom_target(build_libs ALL VERBATIM
WORKING_DIRECTORY "${BUILDDIR}"
DEPENDS depend
- BYPRODUCTS "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
+ BYPRODUCTS ${INSTALL_LIBS}
)
install(
- FILES "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
+ FILES ${INSTALL_LIBS}
DESTINATION lib
)
diff --git a/ports/openssl-unix/CONTROL b/ports/openssl-unix/CONTROL index 4b6ec7405..873046ca8 100644 --- a/ports/openssl-unix/CONTROL +++ b/ports/openssl-unix/CONTROL @@ -1,3 +1,3 @@ Source: openssl-unix -Version: 1.0.2s +Version: 1.0.2s-1 Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. |
