simplejsble 0.0.22 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/ios/CMakeLists.txt +13 -2
  2. package/package.json +1 -1
@@ -1,7 +1,18 @@
1
1
  cmake_minimum_required(VERSION 3.21)
2
2
 
3
- # Path: packages/simplejsble/ios ../../../.. repo root (where simpleble/ lives)
4
- set(PROJECT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
3
+ # Determine if we're in the SimpleBLE monorepo or npm package
4
+ # In monorepo: packages/simplejsble/ios → ../../../.. has cmake/
5
+ # In npm: node_modules/simplejsble/ios → .. has cmake/ (bundled)
6
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/prelude.cmake")
7
+ # npm package - bundled cmake
8
+ set(PROJECT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
9
+ elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/prelude.cmake")
10
+ # Monorepo
11
+ set(PROJECT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
12
+ else()
13
+ message(FATAL_ERROR "Cannot find SimpleBLE cmake files. Checked:\n ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/prelude.cmake\n ${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/prelude.cmake")
14
+ endif()
15
+
5
16
  set(BUILD_SHARED_LIBS OFF) # Static library for iOS
6
17
 
7
18
  include(${PROJECT_ROOT_DIR}/cmake/prelude.cmake)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplejsble",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "React Native Bluetooth Low Energy library using SimpleBLE with Nitro Modules",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",