diff options
| author | Davide Beatrici <davidebeatrici@gmail.com> | 2019-11-22 06:17:35 +0100 |
|---|---|---|
| committer | Davide Beatrici <davidebeatrici@gmail.com> | 2019-11-22 06:17:35 +0100 |
| commit | 9a01ec282e7e1ebe8d901cd08d245e72e2d9a274 (patch) | |
| tree | a304a1cba748e53ede0cddb29e2d46f1a02aa840 | |
| parent | cccd1ed932c20daa9aa61d47aacd8bcc342c4e48 (diff) | |
| download | vcpkg-9a01ec282e7e1ebe8d901cd08d245e72e2d9a274.tar.gz vcpkg-9a01ec282e7e1ebe8d901cd08d245e72e2d9a274.zip | |
[qt5-base] Add option to link to OpenSSL at compile-time
By default Qt loads OpenSSL at runtime.
This commit adds a "QT_OPENSSL_LINK" option, which specifies "-openssl-linked". The option is enabled by default for static configurations.
From https://doc.qt.io/qt-5/ssl.html:
"By default, an SSL-enabled Qt library dynamically loads any installed OpenSSL library at run-time. However, it is possible to link against the library at compile-time by configuring Qt with the -openssl-linked option."
| -rw-r--r-- | ports/qt5-base/CONTROL | 4 | ||||
| -rw-r--r-- | ports/qt5-base/portfile.cmake | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index c981e7256..59fd6788c 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,8 +1,8 @@ Source: qt5-base
-Version: 5.12.5-2
+Version: 5.12.5-3
Homepage: https://www.qt.io/
Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.
Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl
Feature: latest
-Description: Build latest qt version (5.13.1) instead of LTS
\ No newline at end of file +Description: Build latest qt version (5.13.1) instead of LTS
diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 4deb298c1..42ab6c792 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -1,5 +1,11 @@ vcpkg_buildpath_length_warning(37) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + option(QT_OPENSSL_LINK "Link against OpenSSL at compile-time." ON) +else() + option(QT_OPENSSL_LINK "Link against OpenSSL at compile-time." OFF) +endif() + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) @@ -75,6 +81,10 @@ list(APPEND CORE_OPTIONS -system-sqlite -system-harfbuzz) +if(QT_OPENSSL_LINK) + list(APPEND CORE_OPTIONS -openssl-linked) +endif() + find_library(ZLIB_RELEASE NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) find_library(ZLIB_DEBUG NAMES z zlib zd zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) find_library(JPEG_RELEASE NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) @@ -282,4 +292,4 @@ if(QT_BUILD_LATEST) DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5 ) -endif()
\ No newline at end of file +endif() |
