Skip to content

Commit

Permalink
Define the path to Qt DLL for OpenSSL and install them with cpack
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
  • Loading branch information
ghutchis committed Feb 7, 2024
1 parent 09fb213 commit 871891b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
os: windows-latest,
cc: "cl", cxx: "cl",
build_type: "Release",
cmake_flags: "",
cmake_flags: "-DOPENSSL_ROOT_DIR=D:\\a\\Tools\\OpenSSL\\Win_x64",
build_flags: "-j 2",
cpack_flags: "-G NSIS",
}
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get -qq update
sudo apt-get -qq install ninja-build libeigen3-dev libboost-all-dev libglew-dev libxml2-dev
sudo apt-get -qq install ninja-build libeigen3-dev libboost-all-dev libglew-dev libxml2-dev
sudo apt-get -qq install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5x11extras5-dev libqt5svg5-dev
- name: Install Dependencies (macOS)
if: runner.os == 'macOS'
Expand Down Expand Up @@ -157,18 +157,18 @@ jobs:

- name: Fix Mac plugins
if: runner.os == 'macOS'
working-directory: ${{ runner.workspace }}/build/prefix/lib/openbabel
working-directory: ${{ runner.workspace }}/build/prefix/lib/openbabel
run: |
for plugin in *.so; do
for libpath in `otool -L ${plugin} | grep '/Users/runner/work' | awk '{print $1}'`; do
for libpath in `otool -L ${plugin} | grep '/Users/runner/work' | awk '{print $1}'`; do
export lib=`echo $libpath | cut -d '/' -f 9`;
echo "Fixing $plugin $lib $libpath"
install_name_tool -change $libpath @executable_path/../Frameworks/$lib $plugin
done
done
cd .. # build/prefix/lib
for plugin in libinchi.?.?.?.dylib; do
for libpath in `otool -L ${plugin} | grep '/Users/runner/work' | awk '{print $1}'`; do
for libpath in `otool -L ${plugin} | grep '/Users/runner/work' | awk '{print $1}'`; do
export lib=`echo $libpath | cut -d '/' -f 9`;
echo "Fixing $plugin $lib $libpath"
install_name_tool -change $libpath @executable_path/../Frameworks/$lib $plugin
Expand Down Expand Up @@ -299,4 +299,3 @@ jobs:
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
10 changes: 9 additions & 1 deletion cmake/AvogadroCPack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if(APPLE)
"${AvogadroApp_SOURCE_DIR}/avogadro/icons/avogadro.icns")
set(CPACK_BUNDLE_ICON "${CPACK_PACKAGE_ICON}")

if(${CMAKE_VERSION} VERSION_GREATER "3.19.0")
if(${CMAKE_VERSION} VERSION_GREATER "3.19.0")
# add the codesign options to the package
configure_file("${CMAKE_CURRENT_LIST_DIR}/deploy-osx.cmake.in" "${AvogadroApp_BINARY_DIR}/deploy-osx.cmake" @ONLY)
set(CPACK_PRE_BUILD_SCRIPTS "${AvogadroApp_BINARY_DIR}/deploy-osx.cmake")
Expand Down Expand Up @@ -51,6 +51,14 @@ if(INSTALL_BUNDLE_FILES)
install(DIRECTORY "${AvogadroLibs_DATA_DIR}/avogadro2"
DESTINATION ${INSTALL_DATA_DIR})

# grab OpenSSL for Windows
if(WIN32)
if (OPENSSL_ROOT_DIR)
file(GLOB OPENSSL_DLL ${OPENSSL_ROOT_DIR}/bin/*.dll)
install(FILES ${OPENSSL_DLL} DESTINATION ${INSTALL_RUNTIME_DIR})
endif()
endif()

# create a list of exe to run fixup_bundle on
set(BUNDLE_EXE_LIST "")

Expand Down

0 comments on commit 871891b

Please sign in to comment.