From 4d2a5f665d0d6c03a00ad7c17b3a35f891b6f5d3 Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Wed, 7 Feb 2024 16:56:46 -0500 Subject: [PATCH] One more time with environment variables Signed-off-by: Geoff Hutchison --- .github/workflows/build_cmake.yml | 7 ++++++- cmake/AvogadroCPack.cmake | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 46762e9a..42c7900c 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -53,7 +53,8 @@ jobs: build_type: "Release", cmake_flags: "-DOPENSSL_ROOT_DIR=D:\\a\\Tools\\OpenSSL\\Win_x64", build_flags: "-j 2", - cpack_flags: "-G NSIS -DOPENSSL_ROOT_DIR=D:\\a\\Tools\\OpenSSL\\Win_x64", + cpack_flags: "-G NSIS", + ssl_env: "D:\\a\\Tools\\OpenSSL\\Win_x64", } - { name: "Ubuntu Address Sanitizer", artifact: "", @@ -236,10 +237,14 @@ jobs: if [ -z "${P12_PASSWORD}" ]; then unset CODESIGN_IDENTITY # to prevent cpack failing when trying to sign fi + if [ -z "${OPENSSL_ROOT_DIR}" ]; then + unset OPENSSL_ROOT_DIR + fi cpack ${{ matrix.config.cpack_flags }} env: P12_PASSWORD: ${{ secrets.P12_PASSWORD }} CODESIGN_IDENTITY: ${{ secrets.CODESIGN_ID }} + OPENSSL_ROOT_DIR: ${{ matrix.config.ssl_env }} working-directory: ${{ runner.workspace }}/build/avogadroapp - name: AppImage diff --git a/cmake/AvogadroCPack.cmake b/cmake/AvogadroCPack.cmake index f6c60198..ab7cb956 100644 --- a/cmake/AvogadroCPack.cmake +++ b/cmake/AvogadroCPack.cmake @@ -53,8 +53,8 @@ if(INSTALL_BUNDLE_FILES) # grab OpenSSL for Windows if(WIN32) - if (OPENSSL_ROOT_DIR) - file(GLOB OPENSSL_DLL ${OPENSSL_ROOT_DIR}/bin/*.dll) + if(DEFINED ENV{OPENSSL_ROOT_DIR}) + file(GLOB OPENSSL_DLL $ENV{OPENSSL_ROOT_DIR}/bin/*.dll) install(FILES ${OPENSSL_DLL} DESTINATION ${INSTALL_RUNTIME_DIR}) endif() endif()