@amafil/react-native-pdf-toolkit 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.13)
|
|
2
|
+
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
3
|
+
|
|
4
|
+
add_compile_options(
|
|
5
|
+
-fexceptions
|
|
6
|
+
-frtti
|
|
7
|
+
-O2
|
|
8
|
+
-Wno-unused-parameter
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
# This file is at android/src/main/jni/; resolve the sibling build directory
|
|
12
|
+
# where the react-native gradle plugin writes codegen outputs.
|
|
13
|
+
get_filename_component(LIBRARY_ANDROID_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../.." ABSOLUTE)
|
|
14
|
+
set(CODEGEN_JNI "${LIBRARY_ANDROID_DIR}/build/generated/source/codegen/jni")
|
|
15
|
+
|
|
16
|
+
file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS
|
|
17
|
+
"${CODEGEN_JNI}/*.cpp"
|
|
18
|
+
"${CODEGEN_JNI}/react/renderer/components/rnpdf/*.cpp"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
# Build as SHARED (not OBJECT) so autolinking can call target_link_libraries
|
|
22
|
+
# on this target from the parent CMake project scope without errors.
|
|
23
|
+
add_library(react_codegen_rnpdf SHARED ${react_codegen_SRCS})
|
|
24
|
+
|
|
25
|
+
target_include_directories(react_codegen_rnpdf
|
|
26
|
+
PUBLIC
|
|
27
|
+
"${CODEGEN_JNI}"
|
|
28
|
+
"${CODEGEN_JNI}/react/renderer/components/rnpdf"
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
find_package(ReactAndroid REQUIRED CONFIG)
|
|
32
|
+
find_package(fbjni REQUIRED CONFIG)
|
|
33
|
+
|
|
34
|
+
target_link_libraries(react_codegen_rnpdf
|
|
35
|
+
fbjni::fbjni
|
|
36
|
+
ReactAndroid::jsi
|
|
37
|
+
ReactAndroid::reactnative
|
|
38
|
+
)
|
package/package.json
CHANGED