Skip to content

Commit

Permalink
preprocessor only for target
Browse files Browse the repository at this point in the history
  • Loading branch information
CedricGuillemet committed Sep 7, 2023
1 parent ececebc commit a330c68
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 4 additions & 0 deletions Modules/@babylonjs/react-native-iosandroid/ios/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions Modules/@babylonjs/react-native/shared/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
if (${BASEKIT_BUILD})
add_definitions(-DBASEKIT_BUILD)
endif()

set(SHARED_INCLUDES
"${CMAKE_CURRENT_LIST_DIR}")

Expand Down

0 comments on commit a330c68

Please sign in to comment.