$ the-wire · showcase
CMake now resolves React umbrella headers
By RepoJournal · Filed · About Meta · Composed from the cited sources · methodology
React Native's CMake builds now export the `React/*.h` umbrella headers for the view, debug, and mapbuffer modules, so includes that already worked under every other build system no longer fail there.
The `React/*.h` umbrella headers for `react/renderer/components/view`, `react/debug` and `react/renderer/mapbuffer` were exported by every build system except CMake [1]. In CMake builds, `#include <React/View.h>`, `<React/Debug.h>` and `<React/MapBuffer.h>` failed to resolve. The change adds the missing `target_include_directories(<target> INTERFACE ...)` entry to each module, matching the equivalent commit [1].
Before this, a CMake build that pulled in any of those three includes would fail at include resolution; it now finds the umbrella headers the same way the other build systems do. Nothing else about the modules' contents or interfaces changed, so consumers do not need to touch their own include paths: the fix moves the exported directories into CMake, not the headers.
If you build React Native from source through CMake and your code depends on those umbrella headers, the breakage is on the CMake side and this is the patch for it [1].
Action items
- → Pull the CMake umbrella header fix if your source build includes <React/View.h>, <React/Debug.h> or <React/MapBuffer.h> facebook/react-native [plan]
References
- [1] Resolve umbrella headers in CMake builds (#58483) ↗ facebook/react-native