Skip to content

Commit

Permalink
Use absolute path when compiling appmodules.so sources (#47379)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cortinico authored and facebook-github-bot committed Nov 5, 2024
1 parent 83d3850 commit 3956955
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if (PROJECT_ROOT_DIR)
endif ()

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

add_library(${CMAKE_PROJECT_NAME} SHARED ${input_SRC})
Expand Down

0 comments on commit 3956955

Please sign in to comment.