Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kraenhansen committed Dec 1, 2023
1 parent 21da553 commit 0fb8407
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 1 addition & 5 deletions packages/realm/bindgen/CMakeLists.txt
Expand Up @@ -16,11 +16,7 @@ if(DEFINED CMAKE_JS_VERSION)
endif()
elseif(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9")
if(NODE_ARCH STREQUAL "arm64")
set(CMAKE_OSX_ARCHITECTURES "arm64" CACHE STRING "")
else()
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "")
endif()
# CMAKE_OSX_ARCHITECTURES is defined by cmake-js
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
if(NODE_ARCH STREQUAL "arm")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/vendor/realm-core/tools/cmake/armv7-linux-gnueabihf.toolchain.cmake")
Expand Down
12 changes: 11 additions & 1 deletion packages/realm/package.json
Expand Up @@ -79,6 +79,7 @@
"build:node:prebuild:arm64": "wireit",
"build:node:prebuild:x64": "wireit",
"build:node:prebuild:ia32": "wireit",
"build:node:prebuild:universal": "wireit",
"build:android": "wireit",
"build:ios": "wireit",
"build:ios:debug:simulator": "wireit",
Expand Down Expand Up @@ -186,8 +187,11 @@
]
},
"build:node:prebuild": {
"command": "cross-env-shell prebuild --runtime napi --arch $PREBUILD_ARCH -- --directory bindgen",
"command": "cross-env-shell prebuild --runtime napi --arch '$PREBUILD_ARCH' -- --directory bindgen",
"env": {
"npm_config_nodedir": {
"external": true
},
"PREBUILD_ARCH": {
"external": true
}
Expand Down Expand Up @@ -217,6 +221,12 @@
"PREBUILD_ARCH": "ia32"
}
},
"build:node:prebuild:universal": {
"command": "npm run build:node:prebuild",
"env": {
"PREBUILD_ARCH": "x86_64;arm64"
}
},
"build:android": {
"command": "node ../../scripts/build-android.js",
"files": [
Expand Down

0 comments on commit 0fb8407

Please sign in to comment.