-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
45 lines (37 loc) · 1.13 KB
/
Copy pathCMakeLists.txt
File metadata and controls
45 lines (37 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
project(NitroText)
cmake_minimum_required(VERSION 3.9.0)
set (PACKAGE_NAME NitroText)
set (CMAKE_VERBOSE_MAKEFILE ON)
set (CMAKE_CXX_STANDARD 20)
# Enable Raw Props parsing in react-native (for Nitro Views)
add_compile_options(-DRN_SERIALIZABLE_STATE=1)
# Define C++ library and add all sources
add_library(${PACKAGE_NAME} SHARED
src/main/cpp/cpp-adapter.cpp
)
# Add Nitrogen specs :)
include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/NitroText+autolinking.cmake)
# Set up local includes
include_directories(
"src/main/cpp"
"../cpp"
)
# Add custom ShadowNode implementation
target_sources(
${PACKAGE_NAME} PRIVATE
../cpp/NitroHtmlUtils.cpp
../cpp/NitroHtmlUtils.hpp
../cpp/NitroTextShadowNode.cpp
../cpp/NitroTextShadowNode.hpp
../cpp/NitroTextComponentDescriptor.cpp
../cpp/NitroTextComponentDescriptor.hpp
src/main/cpp/NitroTextRegisterProvider.cpp
..
)
find_library(LOG_LIB log)
# Link all libraries together
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
android # <-- Android core
)