Skip to content

Commit 054ab62

Browse files
alesperglfacebook-github-bot
authored andcommitted
Fix building Android on Windows (#39190)
Summary: Currently Android fails to build on Windows, because CMake cannot work with native Windows paths that are passed to it as build arguments. This change converts the input paths to the CMake format. ## Changelog: [Android] [Fixed] - Fix building Android on Windows. Pull Request resolved: #39190 Test Plan: Build the React Native Android project on Windows. It should complete successfully. Reviewed By: NickGerleman Differential Revision: D48948140 Pulled By: cortinico fbshipit-source-id: 6d584c2a10e683cdb6df0dd6dcd5875da7e06e2b
1 parent 7f26b08 commit 054ab62

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/react-native/ReactAndroid/src/main/jni/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ set(CMAKE_VERBOSE_MAKEFILE on)
88

99
project(ReactAndroid)
1010

11+
# Convert input paths to CMake format (with forward slashes)
12+
file(TO_CMAKE_PATH "${REACT_ANDROID_DIR}" REACT_ANDROID_DIR)
13+
file(TO_CMAKE_PATH "${REACT_BUILD_DIR}" REACT_BUILD_DIR)
14+
file(TO_CMAKE_PATH "${REACT_COMMON_DIR}" REACT_COMMON_DIR)
15+
1116
# If you have ccache installed, we're going to honor it.
1217
find_program(CCACHE_FOUND ccache)
1318
if(CCACHE_FOUND)

0 commit comments

Comments
 (0)