diff --git a/src/Packaging.cmake b/src/Packaging.cmake index 40587529b6..c9f6d2d77a 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -6,6 +6,10 @@ get_target_property(QMAKE_EXECUTABLE Qt::qmake IMPORTED_LOCATION) get_filename_component(QT_BIN_DIR "${QMAKE_EXECUTABLE}" DIRECTORY) execute_process(COMMAND ${QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT_VERSION) +set(QT_TOOLS_DIR "${QT_BIN_DIR}/../../../Tools") +cmake_path(NORMAL_PATH QT_TOOLS_DIR OUTPUT_VARIABLE QT_TOOLS_DIR) +set(OPENSSL_ROOT_DIR "${QT_TOOLS_DIR}/OpenSSL/Win_x64" CACHE STRING "OpenSSL dir") + # To use the specific version of Qt set(WINDEPLOYQT_EXECUTABLE "${QT_BIN_DIR}/windeployqt") @@ -48,6 +52,11 @@ function(windeployqt target) add_dependencies(deploy lrelease) install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/winqt/" DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL) + + file(GLOB OPENSSL_LIBS_FILES "${OPENSSL_ROOT_DIR}/bin/lib*.dll") + cmake_path(NORMAL_PATH OPENSSL_LIBS_FILES OUTPUT_VARIABLE OPENSSL_LIBS_FILES) + install(FILES ${OPENSSL_LIBS_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" ) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) include(InstallRequiredSystemLibraries) endfunction()