From fad7d95462dab08dc706b2f2ed6810765e48e7af Mon Sep 17 00:00:00 2001 From: Le Tan Date: Fri, 3 May 2024 20:39:04 +0800 Subject: [PATCH] fix openssl --- .github/workflows/ci-win.yml | 4 ++-- src/Packaging.cmake | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-win.yml b/.github/workflows/ci-win.yml index 0a445ab6f4..416973398f 100644 --- a/.github/workflows/ci-win.yml +++ b/.github/workflows/ci-win.yml @@ -99,7 +99,7 @@ jobs: run: | cmake --version call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} %GITHUB_WORKSPACE% + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} -DOPENSSL_EXTRA_LIB_DIR=.\openssl-utils.git\1.1.1j\Win_x64 %GITHUB_WORKSPACE% cmake --build . cmake --build . --target=deploy cmake --build . --target=pack @@ -117,7 +117,7 @@ jobs: - name: Archive Artifacts uses: actions/upload-artifact@v2 with: - name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip + name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}} path: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}} - name: Archive Installer diff --git a/src/Packaging.cmake b/src/Packaging.cmake index 84a8fa7d01..93331464c8 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -56,7 +56,11 @@ function(windeployqt target) set(OPENSSL_ROOT_DIR "${QT_TOOLS_DIR}/OpenSSL/Win_x64" CACHE STRING "OpenSSL dir") 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}" ) + install(FILES ${OPENSSL_LIBS_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL) + + file(GLOB OPENSSL_EXTRA_LIB_FILES "${OPENSSL_EXTRA_LIB_DIR}/lib*.dll") + cmake_path(NORMAL_PATH OPENSSL_EXTRA_LIB_FILES OUTPUT_VARIABLE OPENSSL_EXTRA_LIB_FILES) + install(FILES ${OPENSSL_EXTRA_LIB_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}") set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) include(InstallRequiredSystemLibraries)