Thanks Alain, I got it working with the following.
cmake_minimum_required(VERSION 3.10.2)
project(reactnativezstd)
set (CMAKE_VERBOSE_MAKEFILE ON)
set (CMAKE_CXX_STANDARD 11)
#
set(ZSTD_BUILD_PROGRAMS OFF) # Avoid Target "zstd" of type EXECUTABLE may not be linked into another target error
set(ZSTD_LEGACY_SUPPORT OFF)
set(ZSTD_BUILD_TESTS OFF)
add_subdirectory(../zstd/build/cmake _zstd)
#
add_library(reactnativezstd
SHARED
../cpp/react-native-testlib.cpp
cpp-adapter.cpp
)
target_include_directories(
reactnativezstd
PUBLIC
../zstd/lib
../cpp
)
#
add_library(libzstd STATIC IMPORTED)
set_property(TARGET libzstd PROPERTY IMPORTED_LOCATION _zstd/lib/libzstd.a)
target_link_libraries(
reactnativezstd
PRIVATE
libzstd
)
Are there some improvements to this file or is it fine as it is?