@@ -8,6 +8,7 @@ set(CMAKE_VERBOSE_MAKEFILE on)
88
99project (fantom_tester)
1010find_library (LIB_HERMES libhermes
11+ NAMES hermes
1112 HINTS ${REACT_ANDROID_DIR} /hermes-engine/build/hermes/API/hermes
1213 REQUIRED )
1314# Ensure the library path is correct and the library exists
2627 add_library (hermes-engine::libhermes ALIAS ${LIB_HERMES} )
2728endif ()
2829
30+ find_package (OpenSSL REQUIRED )
31+
2932include_directories (${REACT_ANDROID_DIR} /hermes-engine/build/prefab-headers )
3033
3134include (${REACT_COMMON_DIR} /cmake-utils/react-native-flags.cmake )
@@ -42,16 +45,20 @@ add_react_third_party_ndk_subdir(glog)
4245add_react_third_party_ndk_subdir (double-conversion )
4346add_react_third_party_ndk_subdir (fast_float )
4447add_react_third_party_ndk_subdir (fmt )
45- add_react_third_party_ndk_subdir (folly )
48+ add_fantom_third_party_subdir (folly )
4649add_fantom_third_party_subdir (gflags )
50+ add_fantom_third_party_subdir (nlohmann_json )
51+
52+ add_subdirectory (${FANTOM_CODEGEN_DIR} codegen )
4753
48- add_fantom_codegen_subdir ( react )
54+ add_library ( glog_init INTERFACE )
4955
50- #add_react_common_subdir(hermes/executor)
51- #add_react_common_subdir(hermes/inspector-modern)
52- #add_react_common_subdir(react/runtime/hermes)
5356add_react_common_subdir (callinvoker )
5457add_react_common_subdir (cxxreact )
58+ add_react_common_subdir (devtoolsruntimesettings )
59+ add_react_common_subdir (hermes/executor )
60+ add_react_common_subdir (hermes/inspector-modern )
61+ add_react_common_subdir (jserrorhandler )
5562add_react_common_subdir (jsi )
5663add_react_common_subdir (jsiexecutor )
5764add_react_common_subdir (jsinspector-modern )
@@ -64,32 +71,102 @@ add_react_common_subdir(oscompat)
6471add_react_common_subdir (react/bridging )
6572add_react_common_subdir (react/debug )
6673add_react_common_subdir (react/featureflags )
74+ add_react_common_subdir (react/nativemodule/core )
75+ add_react_common_subdir (react/nativemodule/cputime )
76+ add_react_common_subdir (react/nativemodule/defaults )
77+ add_react_common_subdir (react/nativemodule/devtoolsruntimesettings )
78+ add_react_common_subdir (react/nativemodule/dom )
79+ add_react_common_subdir (react/nativemodule/fantomtestspecificmethods )
80+ add_react_common_subdir (react/nativemodule/featureflags )
81+ add_react_common_subdir (react/nativemodule/idlecallbacks )
82+ add_react_common_subdir (react/nativemodule/intersectionobserver )
83+ add_react_common_subdir (react/nativemodule/microtasks )
84+ add_react_common_subdir (react/nativemodule/mutationobserver )
85+ add_react_common_subdir (react/nativemodule/webperformance )
6786add_react_common_subdir (react/performance/timeline )
87+ add_react_common_subdir (react/renderer/attributedstring )
88+ add_react_common_subdir (react/renderer/bridging )
89+ add_react_common_subdir (react/renderer/componentregistry )
90+ add_react_common_subdir (react/renderer/componentregistry/native )
91+ add_react_common_subdir (react/renderer/components/image )
92+ add_react_common_subdir (react/renderer/components/legacyviewmanagerinterop )
93+ add_react_common_subdir (react/renderer/components/modal )
94+ add_react_common_subdir (react/renderer/components/root )
95+ add_react_common_subdir (react/renderer/components/scrollview )
96+ add_react_common_subdir (react/renderer/components/text )
97+ add_react_common_subdir (react/renderer/components/view )
98+ add_react_common_subdir (react/renderer/consistency )
99+ add_react_common_subdir (react/renderer/core )
100+ add_react_common_subdir (react/renderer/css )
101+ add_react_common_subdir (react/renderer/debug )
102+ add_react_common_subdir (react/renderer/dom )
103+ add_react_common_subdir (react/renderer/graphics )
104+ add_react_common_subdir (react/renderer/imagemanager )
105+ add_react_common_subdir (react/renderer/leakchecker )
106+ add_react_common_subdir (react/renderer/mapbuffer )
107+ add_react_common_subdir (react/renderer/mounting )
108+ add_react_common_subdir (react/renderer/observers/events )
109+ add_react_common_subdir (react/renderer/observers/intersection )
110+ add_react_common_subdir (react/renderer/observers/mutation )
111+ add_react_common_subdir (react/renderer/runtimescheduler )
112+ add_react_common_subdir (react/renderer/scheduler )
113+ add_react_common_subdir (react/renderer/telemetry )
114+ add_react_common_subdir (react/renderer/textlayoutmanager )
115+ add_react_common_subdir (react/renderer/uimanager )
116+ add_react_common_subdir (react/renderer/uimanager/consistency )
117+ add_react_common_subdir (react/runtime )
118+ add_react_common_subdir (react/runtime/hermes )
68119add_react_common_subdir (react/timing )
120+ add_react_common_subdir (react/utils )
69121add_react_common_subdir (reactperflogger )
70122add_react_common_subdir (runtimeexecutor )
71123add_react_common_subdir (yoga )
72124
73- add_fantom_react_common_subdir (react/nativemodule/core )
74- add_fantom_react_common_subdir (react/utils )
75- add_fantom_react_common_subdir (react/runtime/hermes )
76- add_fantom_react_common_subdir (hermes/inspector-modern )
77- add_fantom_react_common_subdir (hermes/executor )
125+ # This is a hack to make sure that libraries that depend on jni yoga are linked
126+ add_library (yoga ALIAS yogacore )
127+
128+ add_react_cxx_platform_subdir (react/coremodules )
129+ add_react_cxx_platform_subdir (react/devsupport )
130+ add_react_cxx_platform_subdir (react/http )
131+ add_react_cxx_platform_subdir (react/io )
132+ add_react_cxx_platform_subdir (react/logging )
133+ add_react_cxx_platform_subdir (react/nativemodule )
134+ add_react_cxx_platform_subdir (react/profiling )
135+ add_react_cxx_platform_subdir (react/renderer/animated )
136+ add_react_cxx_platform_subdir (react/renderer/scheduler )
137+ add_react_cxx_platform_subdir (react/renderer/uimanager )
138+ add_react_cxx_platform_subdir (react/runtime )
139+ add_react_cxx_platform_subdir (react/threading )
140+ add_react_cxx_platform_subdir (react/utils )
78141
79- file (GLOB SOURCES " src/*.cpp" " src/*.h" )
142+ file (GLOB SOURCES src/*.cpp src/**/*.cpp )
80143add_executable (fantom_tester ${SOURCES} )
81144
145+ target_include_directories (fantom_tester PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /src )
146+
82147target_link_libraries (fantom_tester
83148 PRIVATE
84- ${LIB_HERMES}
149+ # third-party
85150 boost
86- bridgelesshermes
87- callinvoker
151+ double-conversion
152+ fmt
88153 folly_runtime
89154 gflags
90155 glog
156+
157+ # hermes
158+ hermes-engine::libhermes
159+
160+ # codegen
161+ react_codegen_rncore
162+
163+ # ReactCommon
164+ bridgeless
165+ bridgelesshermes
166+ devtoolsruntimesettings
91167 hermes_executor_common
92168 hermes_inspector_modern
169+ jserrorhandler
93170 jsi
94171 jsinspector
95172 jsinspector_cdp
@@ -100,17 +177,68 @@ target_link_libraries(fantom_tester
100177 logger
101178 oscompat
102179 react_bridging
103- react_codegen_rncore
104180 react_cxxreact
105181 react_debug
106182 react_featureflags
107183 react_nativemodule_core
184+ react_nativemodule_cpu
185+ react_nativemodule_defaults
186+ react_nativemodule_devtoolsruntimesettings
187+ react_nativemodule_dom
188+ react_nativemodule_fantomspecificmethods
189+ react_nativemodule_featureflags
190+ react_nativemodule_idlecallbacks
191+ react_nativemodule_intersectionobserver
192+ react_nativemodule_microtasks
193+ react_nativemodule_mutationobserver
194+ react_nativemodule_webperformance
108195 react_performance_timeline
109- react_timing
196+ react_renderer_attributedstring
197+ react_renderer_componentregistry
198+ react_renderer_consistency
199+ react_renderer_core
200+ react_renderer_css
201+ react_renderer_debug
202+ react_renderer_dom
203+ react_renderer_graphics
204+ react_renderer_imagemanager
205+ react_renderer_leakchecker
206+ react_renderer_mapbuffer
207+ react_renderer_mounting
208+ react_renderer_observers_events
209+ react_renderer_observers_intersection
210+ react_renderer_observers_mutation
211+ react_renderer_runtimescheduler
212+ react_renderer_scheduler
213+ react_renderer_telemetry
214+ react_renderer_textlayoutmanager
215+ react_renderer_uimanager
216+ react_renderer_uimanager_consistency
110217 react_utils
111218 reactperflogger
219+ rrc_legacyviewmanagerinterop
220+ rrc_image
221+ rrc_modal
222+ rrc_native
223+ rrc_root
224+ rrc_scrollview
225+ rrc_text
226+ rrc_view
112227 runtimeexecutor
113228 yogacore
229+
230+ # ReactCxxPlatform
231+ react_cxx_platform_react_coremodules
232+ react_cxx_platform_react_devsupport
233+ react_cxx_platform_react_http
234+ react_cxx_platform_react_io
235+ react_cxx_platform_react_logging
236+ react_cxx_platform_react_profiling
237+ react_cxx_platform_react_renderer_animated
238+ react_cxx_platform_react_renderer_scheduler
239+ react_cxx_platform_react_runtime
240+ react_cxx_platform_react_threading
241+ react_cxx_platform_react_utils
114242)
115243
116244target_compile_options (fantom_tester
0 commit comments