Skip to content

Commit 3956955

Browse files
cortinicofacebook-github-bot
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 83d3850 commit 3956955

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
@@ -41,7 +41,7 @@ if (PROJECT_ROOT_DIR)
4141
endif ()
4242

4343
file(GLOB input_SRC CONFIGURE_DEPENDS
44-
*.cpp
44+
${REACT_ANDROID_DIR}/cmake-utils/default-app-setup/*.cpp
4545
${BUILD_DIR}/generated/autolinking/src/main/jni/*.cpp)
4646

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

0 commit comments

Comments
 (0)