Skip to content

Commit c4fd80f

Browse files
cortinicoblakef
authored andcommitted
Use absolute path when compiling appmodules.so sources (#47379)
Summary: Fixes #47352 This fixes a bug when the user is providing its own CMakeLists.txt file say because they want to compile more C++ code than we actually provide. Previously the `*.cpp` will evalute file in the current directory, meaning that the app's default `OnLoad.cpp` file would be ignored. ## Changelog: [ANDROID] [FIXED] - Use absolute path when compiling appmodules.so sources Pull Request resolved: #47379 Test Plan: Tested against the reproducer provided in: - Use absolute path when compiling appmodules.so sources Reviewed By: cipolleschi Differential Revision: D65428676 Pulled By: cortinico fbshipit-source-id: 7f3e4d470da0fffc5191c1a2c7e8fec517fee496
1 parent e9fc092 commit c4fd80f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if(CMAKE_HOST_WIN32)
3636
endif()
3737

3838
file(GLOB input_SRC CONFIGURE_DEPENDS
39-
*.cpp
39+
${REACT_ANDROID_DIR}/cmake-utils/default-app-setup/*.cpp
4040
${BUILD_DIR}/generated/autolinking/src/main/jni/*.cpp)
4141

4242
add_library(${CMAKE_PROJECT_NAME} SHARED ${input_SRC})

0 commit comments

Comments
 (0)