Skip to content

Commit 5deb80b

Browse files
committed
use singlke build for mac
1 parent 7554408 commit 5deb80b

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,5 +213,5 @@ jobs:
213213
with:
214214
upload_url: ${{ needs.create_release.outputs.upload_url }}
215215
asset_path: ./build/Release/node-raylib.node
216-
asset_name: node-raylib-darwin-x64.node
216+
asset_name: node-raylib-darwin.node
217217
asset_content_type: application/octet-stream

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ endif()
2222
set(CMAKE_CXX_FLAGS_DEBUG "-g")
2323
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
2424

25+
# single build for both Mac arches
26+
set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)
27+
2528
# version doesn't seem to pick correct version
2629
#find_package(raylib 4.5 QUIET EXACT)
2730
if (NOT raylib_FOUND)

tools/postinstall.js

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ async function main () {
3333

3434
let url = `https://github.com/RobLoach/node-raylib/releases/download/v${process.env.npm_package_version}/node-raylib-${process.platform}-${process.arch}.node`
3535

36+
// we use a single build for both platforms on Mac
37+
if (process.platform === 'darwin') {
38+
url = `https://github.com/RobLoach/node-raylib/releases/download/v${process.env.npm_package_version}/node-raylib-darwin.node`
39+
}
40+
3641
console.log(`Checking for ${url}`)
3742

3843
try {

0 commit comments

Comments
 (0)