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 19c105d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,21 @@ 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
find $(brew --prefix) -name "*.dylib" -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
1 change: 0 additions & 1 deletion cmake/compile_definitions/macos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_compile_definitions(SUNSHINE_PLATFORM="macos")
link_directories(/opt/local/lib)
link_directories(/usr/local/lib)
link_directories(/opt/homebrew/lib)
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)

list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${APP_SERVICES_LIBRARY}
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 19c105d

Please sign in to comment.