The best way to control Claude Code, Codex and more from any computer or phone

main
cmake 81 lines 2.76 KB
Raw
1 #
2 # t3highlights+autolinking.cmake
3 # This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4 # https://github.com/mrousavy/nitro
5 # Copyright © Marc Rousavy @ Margelo
6 #
7
8 # This is a CMake file that adds all files generated by Nitrogen
9 # to the current CMake project.
10 #
11 # To use it, add this to your CMakeLists.txt:
12 # ```cmake
13 # include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/t3highlights+autolinking.cmake)
14 # ```
15
16 # Define a flag to check if we are building properly
17 add_definitions(-DBUILDING_T3HIGHLIGHTS_WITH_GENERATED_CMAKE_PROJECT)
18
19 # Enable Raw Props parsing in react-native (for Nitro Views)
20 add_definitions(-DRN_SERIALIZABLE_STATE)
21
22 # Add all headers that were generated by Nitrogen
23 include_directories(
24 "../nitrogen/generated/shared/c++"
25 "../nitrogen/generated/android/c++"
26 "../nitrogen/generated/android/"
27 )
28
29 # Add all .cpp sources that were generated by Nitrogen
30 target_sources(
31 # CMake project name (Android C++ library name)
32 t3highlights PRIVATE
33 # Autolinking Setup
34 ../nitrogen/generated/android/t3highlightsOnLoad.cpp
35 # Shared Nitrogen C++ sources
36 ../nitrogen/generated/shared/c++/HybridT3HighlightsSpec.cpp
37 # Android-specific Nitrogen C++ sources
38
39 )
40
41 # From node_modules/react-native/ReactAndroid/cmake-utils/folly-flags.cmake
42 # Used in node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake
43 target_compile_definitions(
44 t3highlights PRIVATE
45 -DFOLLY_NO_CONFIG=1
46 -DFOLLY_HAVE_CLOCK_GETTIME=1
47 -DFOLLY_USE_LIBCPP=1
48 -DFOLLY_CFG_NO_COROUTINES=1
49 -DFOLLY_MOBILE=1
50 -DFOLLY_HAVE_RECVMMSG=1
51 -DFOLLY_HAVE_PTHREAD=1
52 # Once we target android-23 above, we can comment
53 # the following line. NDK uses GNU style stderror_r() after API 23.
54 -DFOLLY_HAVE_XSI_STRERROR_R=1
55 )
56
57 # Add all libraries required by the generated specs
58 find_package(fbjni REQUIRED) # <-- Used for communication between Java <-> C++
59 find_package(ReactAndroid REQUIRED) # <-- Used to set up React Native bindings (e.g. CallInvoker/TurboModule)
60 find_package(react-native-nitro-modules REQUIRED) # <-- Used to create all HybridObjects and use the Nitro core library
61
62 # Link all libraries together
63 target_link_libraries(
64 t3highlights
65 fbjni::fbjni # <-- Facebook C++ JNI helpers
66 ReactAndroid::jsi # <-- RN: JSI
67 react-native-nitro-modules::NitroModules # <-- NitroModules Core :)
68 )
69
70 # Link react-native (different prefab between RN 0.75 and RN 0.76)
71 if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
72 target_link_libraries(
73 t3highlights
74 ReactAndroid::reactnative # <-- RN: Native Modules umbrella prefab
75 )
76 else()
77 target_link_libraries(
78 t3highlights
79 ReactAndroid::react_nativemodule_core # <-- RN: TurboModules Core
80 )
81 endif()