Skip to content

Commit 521f703

Browse files
committed
Correct the flatc/flatcc compilation for x86 ios simulator
1 parent e19e4a7 commit 521f703

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

third-party/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ExternalProject_Add(
4141
# Unset the toolchain to build for the host instead of the toolchain set for the project.
4242
-DCMAKE_TOOLCHAIN_FILE=
4343
# If building for iOS, "unset" these variables to rely on the host (macOS) defaults.
44-
$<$<AND:$<BOOL:${APPLE}>,$<BOOL:$<FILTER:${PLATFORM},EXCLUDE,^MAC>>>:-DCMAKE_OSX_SYSROOT=>
44+
$<$<STREQUAL:$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>,ios>:-DCMAKE_OSX_SYSROOT=macosx>
4545
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
4646
BUILD_BYPRODUCTS <INSTALL_DIR>/bin/flatc
4747
${_executorch_external_project_additional_args}
@@ -91,7 +91,7 @@ ExternalProject_Add(
9191
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
9292
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
9393
-DCMAKE_TOOLCHAIN_FILE=
94-
$<$<AND:$<BOOL:${APPLE}>,$<BOOL:$<FILTER:${PLATFORM},EXCLUDE,^MAC>>>:-DCMAKE_OSX_SYSROOT=>
94+
$<$<STREQUAL:$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>,ios>:-DCMAKE_OSX_SYSROOT=macosx>
9595
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
9696
${_flatcc_extra_cmake_args}
9797
BUILD_BYPRODUCTS <INSTALL_DIR>/bin/flatcc

0 commit comments

Comments
 (0)