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 blakef committed Nov 12, 2024
1 parent e9fc092 commit c4fd80f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if(CMAKE_HOST_WIN32)
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 c4fd80f

Please sign in to comment.