diff --git a/Modules/@babylonjs/react-native-iosandroid/android/CMakeLists.txt b/Modules/@babylonjs/react-native-iosandroid/android/CMakeLists.txt index 1396477f9..f80d20b8c 100644 --- a/Modules/@babylonjs/react-native-iosandroid/android/CMakeLists.txt +++ b/Modules/@babylonjs/react-native-iosandroid/android/CMakeLists.txt @@ -51,6 +51,9 @@ add_library(BabylonNative SHARED src/main/cpp/BabylonNativeInterop.cpp ${SHARED_SOURCES}) +if (${BASEKIT_BUILD}) + target_compile_definitions(BabylonNative PRIVATE BASEKIT_BUILD) +endif() set(TURBOMODULE_DIR "${REACTNATIVE_DIR_CMAKE}/ReactAndroid/src/main/jni/react/turbomodule/") if (EXISTS "${TURBOMODULE_DIR}/CMakeLists.txt") diff --git a/Modules/@babylonjs/react-native-iosandroid/ios/CMakeLists.txt b/Modules/@babylonjs/react-native-iosandroid/ios/CMakeLists.txt index 23ff53114..aea876014 100644 --- a/Modules/@babylonjs/react-native-iosandroid/ios/CMakeLists.txt +++ b/Modules/@babylonjs/react-native-iosandroid/ios/CMakeLists.txt @@ -36,6 +36,10 @@ add_subdirectory(${BABYLON_REACT_NATIVE_SHARED_DIR} ${CMAKE_CURRENT_BINARY_DIR}/ add_library(BabylonNative ${SHARED_SOURCES}) +if (${BASEKIT_BUILD}) + target_compile_definitions(BabylonNative PRIVATE BASEKIT_BUILD) +endif() + target_include_directories(BabylonNative PRIVATE ${SHARED_INCLUDES}) target_include_directories(BabylonNative PUBLIC ${CMAKE_CURRENT_LIST_DIR}) diff --git a/Modules/@babylonjs/react-native-windows/windows/CMakeLists.txt b/Modules/@babylonjs/react-native-windows/windows/CMakeLists.txt index 7dcada09c..8600e788a 100644 --- a/Modules/@babylonjs/react-native-windows/windows/CMakeLists.txt +++ b/Modules/@babylonjs/react-native-windows/windows/CMakeLists.txt @@ -26,6 +26,10 @@ add_subdirectory(${BABYLON_NATIVE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/BabylonNative add_library(BabylonNative ${SHARED_SOURCES}) +if (${BASEKIT_BUILD}) + target_compile_definitions(BabylonNative PRIVATE BASEKIT_BUILD) +endif() + target_include_directories(BabylonNative PRIVATE ${SHARED_INCLUDES}) target_link_libraries(BabylonNative diff --git a/Modules/@babylonjs/react-native/shared/CMakeLists.txt b/Modules/@babylonjs/react-native/shared/CMakeLists.txt index 8e2e6ae7b..2744bc19c 100644 --- a/Modules/@babylonjs/react-native/shared/CMakeLists.txt +++ b/Modules/@babylonjs/react-native/shared/CMakeLists.txt @@ -1,7 +1,3 @@ -if (${BASEKIT_BUILD}) - add_definitions(-DBASEKIT_BUILD) -endif() - set(SHARED_INCLUDES "${CMAKE_CURRENT_LIST_DIR}")