Skip to content

Commit 97221e3

Browse files
authored
Merge pull request #844 from protikbiswas100/fabric-windows-implementation
Added android build fix with a minimal CMake stub
2 parents ce6c322 + f16fffd commit 97221e3

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Minimal stub CMakeLists for missing codegen outputs.
2+
# This defines the react_codegen_RNCConfigModule target so native builds
3+
# that expect generated code can link against a placeholder library.
4+
cmake_minimum_required(VERSION 3.4.1)
5+
6+
# Create a small static library with a trivial source file so CMake has a target to link.
7+
add_library(react_codegen_RNCConfigModule STATIC "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
8+
9+
# Expose the current source dir (if other CMake code expects include dirs)
10+
target_include_directories(react_codegen_RNCConfigModule PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
11+
12+
# Prevent warnings when linked against: set an empty interface
13+
target_compile_definitions(react_codegen_RNCConfigModule INTERFACE "REACT_NATIVE_CONFIG_STUB")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Auto-generated stub file to satisfy CMake when real codegen output is not present.
2+
extern "C" void __react_native_config_codegen_stub() {}

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ if (Turbo) {
3434

3535
export const Config = config;
3636
export default Config;
37+

scripts/examples_postinstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ const removeLibraryNpmIgnorePaths = (npmIgnorePath, libraryNodeModulesPath) => {
114114
path.resolve(__dirname, '../.npmignore'),
115115
libraryNodeModulesPath,
116116
);
117-
})();
117+
})();

0 commit comments

Comments
 (0)