Skip to content

Commit

Permalink
ci(macos): statically link macos
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Oct 4, 2023
1 parent 84f1048 commit 3f53d69
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,23 @@ jobs:
# fix openssl header not found
ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl
- name: Install npm packages
run: |
npm install
- name: Remove dynamic libraries
run: |
# find *.dylib in $(brew --prefix) and delete them except if they start with /usr/local/lib/libboost
echo $(brew --prefix)
find $(brew --prefix) -name "*.dylib" -not -path "$(brew --prefix)/lib/libboost_*" -delete
- name: Build MacOS
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
npm install
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
Expand Down
4 changes: 4 additions & 0 deletions cmake/dependencies/macos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ FIND_LIBRARY(VIDEO_TOOLBOX_LIBRARY VideoToolbox)
if(SUNSHINE_ENABLE_TRAY)
FIND_LIBRARY(COCOA Cocoa REQUIRED)
endif()

set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
# workaround to prevent link errors against icudata, icui18n
set(Boost_NO_BOOST_CMAKE ON) # cmake-lint: disable=C0103

0 comments on commit 3f53d69

Please sign in to comment.