Commit e59ed34c authored by Alvin Wong's avatar Alvin Wong

Win: Add pre-built OpenSSL as dep

This adds pre-built OpenSSL binaries to the Windows 3rd-party deps. The
binaries are provided by the curl project [1] [2] using a reproducible
process with publicly-viewable build logs. It should be reputable enough
for our usage.

[1]: https://curl.haxx.se/windows/
[2]: https://github.com/curl/curl-for-win

Differential Revision: https://phabricator.kde.org/D20206
parent 0dd0cfd8
......@@ -118,6 +118,7 @@ Note: on all operating systems the entire procedure is done in a terminal window
On OSX and Windows:
```
cmake --build . --config RelWithDebInfo --target ext_gettext
cmake --build . --config RelWithDebInfo --target ext_openssl
```
On all operating systems:
......
SET(PREFIX_ext_openssl "${EXTPREFIX}" )
ExternalProject_Add( ext_openssl
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://www.openssl.org/source/openssl-1.1.1b.tar.gz
URL_HASH SHA1=e9710abf5e95c48ebf47991b10cbb48c09dae102
if (WIN32)
CONFIGURE_COMMAND <SOURCE_DIR>/config --prefix=${PREFIX_ext_openssl} --openssldir=ssl
# Use the binaries from curl for Windows (https://github.com/curl/curl-for-win).
# The original source URLs are:
# - https://curl.haxx.se/windows/dl-7.64.1/openssl-1.1.1b-win64-mingw.zip
# - https://curl.haxx.se/windows/dl-7.64.1/openssl-1.1.1b-win32-mingw.zip
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
ExternalProject_Add(ext_openssl
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://files.kde.org/krita/build/dependencies/openssl-1.1.1b-win64-mingw.zip
URL_MD5 2dd7041cdcdfb44ad395fd6d4db216a2
BUILD_COMMAND make depend COMMAND make
INSTALL_COMMAND make install
BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying openssl 64-bit dependencies
CONFIGURE_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/include ${PREFIX_ext_openssl}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/lib/libcrypto.dll.a ${PREFIX_ext_openssl}/lib
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/lib/libssl.dll.a ${PREFIX_ext_openssl}/lib
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/libcrypto-1_1-x64.dll ${PREFIX_ext_openssl}/bin
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/libssl-1_1-x64.dll ${PREFIX_ext_openssl}/bin
UPDATE_COMMAND ""
)
else ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
ExternalProject_Add(ext_openssl
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://files.kde.org/krita/build/dependencies/openssl-1.1.1b-win32-mingw.zip
URL_MD5 24021021fb27c357f0728844cfce3927
INSTALL_DIR ${PREFIX_ext_openssl}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_fftw3} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying openssl 32-bit dependencies
CONFIGURE_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/include ${PREFIX_ext_openssl}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/lib/libcrypto.dll.a ${PREFIX_ext_openssl}/lib
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/lib/libssl.dll.a ${PREFIX_ext_openssl}/lib
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/libcrypto-1_1.dll ${PREFIX_ext_openssl}/bin
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/libssl-1_1.dll ${PREFIX_ext_openssl}/bin
UPDATE_COMMAND ""
)
endif ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
UPDATE_COMMAND ""
)
\ No newline at end of file
else (WIN32)
ExternalProject_Add( ext_openssl
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://www.openssl.org/source/openssl-1.1.1b.tar.gz
URL_HASH SHA1=e9710abf5e95c48ebf47991b10cbb48c09dae102
CONFIGURE_COMMAND <SOURCE_DIR>/config --prefix=${PREFIX_ext_openssl} --openssldir=ssl
BUILD_COMMAND make depend COMMAND make
INSTALL_COMMAND make install
INSTALL_DIR ${PREFIX_ext_openssl}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_fftw3} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
)
endif (WIN32)
......@@ -5,13 +5,15 @@ if (WIN32)
-skip qtlocation -skip qtsensors -skip qtserialport -skip qtwayland
-skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview
-skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools
-no-compile-examples -no-dbus -no-iconv -no-qml-debug -no-ssl
-no-compile-examples -no-dbus -no-iconv -no-qml-debug
-no-libproxy -no-system-proxies -no-icu -no-mtdev
-skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtnetworkauth
-skip qtpurchasing -skip qtremoteobjects -skip qtscxml -skip qtserialbus
-skip qtspeech -skip qtvirtualkeyboard
#
-qt-zlib -qt-pcre -qt-libpng -qt-libjpeg
-qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -openssl-linked
-I ${EXTPREFIX_qt}/include
-L ${EXTPREFIX_qt}/lib
#
-opensource -confirm-license
#
......@@ -66,7 +68,7 @@ if (WIN32)
# Use a short name to reduce the chance of exceeding path length limit
SOURCE_DIR s
BINARY_DIR b
DEPENDS ext_patch
DEPENDS ext_patch ext_openssl
)
elseif (NOT APPLE)
ExternalProject_Add(
......
......@@ -707,8 +707,8 @@ if errorlevel 1 (
)
echo.
set EXT_TARGETS=patch png2ico zlib lzma gettext qt boost eigen3 exiv2 fftw3 ilmbase
set EXT_TARGETS=%EXT_TARGETS% jpeg lcms2 ocio openexr png tiff gsl vc libraw
set EXT_TARGETS=patch png2ico zlib lzma gettext openssl qt boost eigen3 exiv2 fftw3
set EXT_TARGETS=%EXT_TARGETS% ilmbase jpeg lcms2 ocio openexr png tiff gsl vc libraw
set EXT_TARGETS=%EXT_TARGETS% giflib freetype poppler kwindowsystem drmingw gmic
set EXT_TARGETS=%EXT_TARGETS% python sip pyqt
set EXT_TARGETS=%EXT_TARGETS% quazip
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment