Skip to content

Commit 82dbd63

Browse files
committed
Examples: skip generator integration for unsupported platforms
1 parent bf6f719 commit 82dbd63

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

examples/tasks/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ if (NOT TARGET objectbox) # Using "if" in case a (potential) parent project alre
2121
)
2222
FetchContent_MakeAvailable(objectbox)
2323

24-
find_package(ObjectBoxGenerator REQUIRED)
25-
add_obx_schema(TARGET ${PROJECT_NAME} SCHEMA_FILES tasklist.fbs INSOURCE)
24+
if ((WIN32 OR CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
25+
AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(arm|aarch64|ARM|AARCH64)")
26+
message(STATUS "Skipping ObjectBox Generator integration, which is not yet supported on this platform (${CMAKE_HOST_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR})")
27+
else ()
28+
find_package(ObjectBoxGenerator REQUIRED)
29+
add_obx_schema(TARGET ${PROJECT_NAME} SCHEMA_FILES tasklist.fbs INSOURCE)
30+
endif ()
2631
endif ()
2732

2833
target_link_libraries(${PROJECT_NAME} objectbox)

examples/vectorsearch-cities/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ if (NOT TARGET objectbox) # Using "if" in case a (potential) parent project alre
2121
)
2222
FetchContent_MakeAvailable(objectbox)
2323

24-
find_package(ObjectBoxGenerator REQUIRED)
25-
add_obx_schema(TARGET ${PROJECT_NAME} SCHEMA_FILES city.fbs INSOURCE)
24+
if ((WIN32 OR CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
25+
AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(arm|aarch64|ARM|AARCH64)")
26+
message(STATUS "Skipping ObjectBox Generator integration, which is not yet supported on this platform (${CMAKE_HOST_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR})")
27+
else ()
28+
find_package(ObjectBoxGenerator REQUIRED)
29+
add_obx_schema(TARGET ${PROJECT_NAME} SCHEMA_FILES tasklist.fbs INSOURCE)
30+
endif ()
2631
endif ()
2732

2833
configure_file(cities.csv ${CMAKE_CURRENT_BINARY_DIR}/cities.csv COPYONLY)

0 commit comments

Comments
 (0)