Skip to content

Commit 85c0c0f

Browse files
mganandrajfacebook-github-bot
authored andcommitted
Fixing failure building RN codegen CLI on Windows (#34791)
Summary: Ensuring the file paths uses forward slashes as separator to avoid the characters from being interpreted as ASCII escape characters. ## Changelog Fixing build failure building RN codegen CLI on Windows. Ensuring the file paths uses forward slashes as separator to avoid the characters from being interpreted as ASCII escape characters. [Android] [Fixed] - Fixing failure building RN codegen CLI on Windows Pull Request resolved: #34791 Test Plan: Ensured RN main branch builds on Windows with new architecture turned on. Reviewed By: cipolleschi Differential Revision: D39889468 Pulled By: cipolleschi fbshipit-source-id: 7d79eac9f433908cc86dd7ca2eec841739ef6365
1 parent 121184b commit 85c0c0f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ReactAndroid/cmake-utils/ReactNative-application.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ endif(CCACHE_FOUND)
2828

2929
include(${REACT_ANDROID_DIR}/cmake-utils/Android-prebuilt.cmake)
3030

31+
set(BUILD_DIR ${PROJECT_BUILD_DIR})
32+
if(CMAKE_HOST_WIN32)
33+
string(REPLACE "\\" "/" BUILD_DIR ${BUILD_DIR})
34+
endif()
35+
3136
file(GLOB input_SRC CONFIGURE_DEPENDS
3237
*.cpp
33-
${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni/*.cpp)
38+
${BUILD_DIR}/generated/rncli/src/main/jni/*.cpp)
3439

3540
add_library(${CMAKE_PROJECT_NAME} SHARED ${input_SRC})
3641

0 commit comments

Comments
 (0)