Skip to content

Commit 4fd68b0

Browse files
committed
add both arm and x86 support for macos
1 parent abae440 commit 4fd68b0

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/cmakebuild.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ jobs:
4040
source-dir: ./
4141
build-dir: build/win32
4242

43-
build-macos:
44-
name: Build on macOS
45-
runs-on: macos-13-arm64 # Currently, i haven't built the libraries for x86
43+
build-macos-arm:
44+
name: Build on macOS ARM
45+
runs-on: macos-latest
4646
steps:
4747
- name: Checkout Project
4848
uses: actions/checkout@v4.2.2
@@ -57,3 +57,21 @@ jobs:
5757
with:
5858
source-dir: ./
5959
build-dir: build/darwin
60+
61+
build-macos-x86:
62+
name: Build on macOS x86
63+
runs-on: macos-13
64+
steps:
65+
- name: Checkout Project
66+
uses: actions/checkout@v4.2.2
67+
68+
- name: Create Bora Structure
69+
run: |
70+
cd ../
71+
git clone https://github.com/boradevelopment/bora-global.git global
72+
73+
- name: Build with CMake
74+
uses: threeal/cmake-action@v2.1.0
75+
with:
76+
source-dir: ./
77+
build-dir: build/darwin

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,11 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
628628
target_link_libraries(BORA PRIVATE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread)
629629
endif()
630630
631+
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)")
631632
target_link_directories(BORA PRIVATE ../global/libs/__apple__)
633+
else()
634+
target_link_directories(BORA PRIVATE ../global/libs/__apple__x86)
635+
endif()
632636
633637
target_link_libraries(BORA PRIVATE
634638
#${BORA_SOURCES_3RDPARTYDLIB}

0 commit comments

Comments
 (0)