Skip to content

Commit

Permalink
RNGP - Pass PROJECT_ROOT_DIR to CMake (#46958)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #46958

This will make it easier to link against custom C++ TM which will most likely live inside ./shared or
some other paths outside of ./android.

CMake will have access to `PROJECT_ROOT_DIR` which points to ./android (the folder where the settings.gradle file exists).

Changelog:
[Internal] [Changed] - RNGP - Pass PROJECT_ROOT_DIR to CMake

Reviewed By: cipolleschi

Differential Revision: D64183641

fbshipit-source-id: 347256c04f10e92cf5a13e9c70db16aa29bcb741
  • Loading branch information
cortinico authored and facebook-github-bot committed Oct 11, 2024
1 parent b69a92e commit 2c45675
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ internal object NdkConfiguratorUtils {
if (cmakeArgs.none { it.startsWith("-DPROJECT_BUILD_DIR") }) {
cmakeArgs.add("-DPROJECT_BUILD_DIR=${project.layout.buildDirectory.get().asFile}")
}
if (cmakeArgs.none { it.startsWith("-DPROJECT_ROOT_DIR") }) {
cmakeArgs.add("-DPROJECT_ROOT_DIR=${project.rootProject.layout.projectDirectory.asFile}")
}
if (cmakeArgs.none { it.startsWith("-DREACT_ANDROID_DIR") }) {
cmakeArgs.add(
"-DREACT_ANDROID_DIR=${extension.reactNativeDir.file("ReactAndroid").get().asFile}")
Expand Down

0 comments on commit 2c45675

Please sign in to comment.