Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(macos): statically link macos #1698

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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