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: setup ninja through aseprite/get-ninja action + cmake: fix macho {compatibility,current} version #95

Merged
merged 2 commits into from
May 1, 2024
Merged
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
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
brew install \
autoconf \
automake \
ninja \
pkg-config \
sdl2 \
${NULL+}
Expand All @@ -58,7 +57,6 @@ jobs:
automake \
cmake \
libsdl2-dev \
ninja-build \
pkg-config \
${NULL+}

Expand All @@ -71,8 +69,8 @@ jobs:
.github/fetch_sdl_vc.ps1
echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/SDL2-devel-VC" >> $Env:GITHUB_ENV
- name: Setup Ninja for MSVC
if: "matrix.platform.msvc"
uses: ashutoshvarma/setup-ninja@master
if: ${{ !contains(matrix.platform.shell, 'msys2') }}
uses: aseprite/get-ninja@main
with:
version: 1.10.2
- uses: ilammy/msvc-dev-cmd@v1
Expand Down
14 changes: 5 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,14 @@ set_target_properties(SDL2_net PROPERTIES
if(NOT ANDROID)
set_target_properties(SDL2_net PROPERTIES
DEBUG_POSTFIX "${SDL2NET_DEBUG_POSTFIX}"
SOVERSION "${LT_MAJOR}"
VERSION "${LT_VERSION}"
)
if(APPLE)
# the SOVERSION property corresponds to the compatibility version and VERSION corresponds to the current version
# https://cmake.org/cmake/help/latest/prop_tgt/SOVERSION.html#mach-o-versions
cmake_minimum_required(VERSION 3.17)
set_target_properties(SDL2_net PROPERTIES
SOVERSION "${DYLIB_COMPATIBILITY_VERSION}"
VERSION "${DYLIB_CURRENT_VERSION}"
)
else()
set_target_properties(SDL2_net PROPERTIES
SOVERSION "${LT_MAJOR}"
VERSION "${LT_VERSION}"
MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}"
MACHO_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}"
)
endif()
endif()
Expand Down
Loading