mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 18:59:00 +08:00
[openssl-unix] Shared library support
Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
This commit is contained in:
parent
2e51afcd65
commit
5495513ef4
@ -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
|
||||
)
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: openssl-unix
|
||||
Version: 1.0.2q
|
||||
Version: 1.0.2q-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.
|
||||
|
Loading…
Reference in New Issue
Block a user