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.
- package/ios/CMakeLists.txt +13 -2
- package/package.json +1 -1
package/ios/CMakeLists.txt
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
cmake_minimum_required(VERSION 3.21)
|
|
2
2
|
|
|
3
|
-
#
|
|
4
|
-
|
|
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)
|