Skip to content

Commit 4e08330

Browse files
committed
Correct the Windows cross-compiling commands
1 parent 8de8f49 commit 4e08330

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backends/xnnpack/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ foreach(fbs_file ${_xnnpack_schema__srcs})
5959
)
6060
endforeach()
6161

62-
if(WIN32)
62+
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
6363
set(MV_COMMAND
6464
powershell -Command
6565
"Move-Item -Path ${_xnnpack_flatbuffer__outputs} -Destination ${_xnnpack_schema__outputs}"

third-party/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ExternalProject_Add(
4949
ExternalProject_Get_Property(flatbuffers_external_project INSTALL_DIR)
5050
add_executable(flatc IMPORTED GLOBAL)
5151
add_dependencies(flatc flatbuffers_external_project)
52-
if(WIN32)
52+
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
5353
# flatbuffers does not use CMAKE_BUILD_TYPE. Internally, the build forces Release
5454
# config, but from CMake's perspective the build type is always Debug.
5555
set_target_properties(flatc PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/bin/flatc.exe)
@@ -101,7 +101,7 @@ file(REMOVE_RECURSE ${PROJECT_SOURCE_DIR}/third-party/flatcc/lib)
101101
ExternalProject_Get_Property(flatcc_external_project INSTALL_DIR)
102102
add_executable(flatcc_cli IMPORTED GLOBAL)
103103
add_dependencies(flatcc_cli flatcc_external_project)
104-
if(WIN32)
104+
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
105105
set_target_properties(flatcc_cli PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/bin/flatcc.exe)
106106
else()
107107
set_target_properties(flatcc_cli PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/bin/flatcc)

0 commit comments

Comments
 (0)