Skip to content

Commit 5a59179

Browse files
authored
Adding arm64 support for OS X. (kwhat#94)
Adding arm64 support for OS X and removing cmake 10.5 min version requirement.
1 parent 35f8e4f commit 5a59179

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

.github/workflows/package.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,42 @@ on:
55
- '**'
66

77
jobs:
8+
apple-arm64:
9+
runs-on: macos-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v1
14+
with:
15+
submodules: true
16+
17+
- name: Compile
18+
env:
19+
CC: clang
20+
CFLAGS: '-O2 -g -target arm64-apple-macos10.5 -flto -fomit-frame-pointer -fno-stack-protector -pipe'
21+
LDFLAGS: '-Wl,-dead_strip_dylibs'
22+
shell: bash
23+
run: |
24+
cmake -B ${{github.workspace}}/build \
25+
-G "Unix Makefiles" \
26+
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/dist/darwin/x86_64 \
27+
-D CMAKE_VERBOSE_MAKEFILE=true \
28+
-D BUILD_SHARED_LIBS=ON \
29+
-D BUILD_DEMO=ON
30+
31+
cmake --build ${{github.workspace}}/build \
32+
--parallel 2 \
33+
--config RelWithDebInfo \
34+
--clean-first
35+
36+
cmake --install ${{github.workspace}}/build --config RelWithDebInfo
37+
38+
- name: Upload
39+
uses: actions/upload-artifact@v2
40+
with:
41+
name: nightly-build
42+
path: ${{github.workspace}}/dist/**/*
43+
844
apple-x86_64:
945
runs-on: macos-latest
1046

@@ -14,10 +50,10 @@ jobs:
1450
with:
1551
submodules: true
1652

17-
- name: Compile x86_64
53+
- name: Compile
1854
env:
1955
CC: clang
20-
CFLAGS: '-O2 -g -march=x86-64 -mtune=generic -flto -fomit-frame-pointer -fno-stack-protector -pipe'
56+
CFLAGS: '-O2 -g -target x86_64-apple-macos10.5 -flto -fomit-frame-pointer -fno-stack-protector -pipe'
2157
LDFLAGS: '-Wl,-dead_strip_dylibs'
2258
shell: bash
2359
run: |

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ if(UNIX AND NOT APPLE)
219219
endif()
220220
elseif(APPLE)
221221
set(CMAKE_MACOSX_RPATH 1)
222-
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5")
223222

224223
find_package(Threads REQUIRED)
225224
target_link_libraries(uiohook "${CMAKE_THREAD_LIBS_INIT}")

0 commit comments

Comments
 (0)