diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..51bac37 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.10) + +project(jni.hpp VERSION 4.0.1) + +option(JNI_HPP_BUILD_TESTS "Build and run tests when BUILD_TESTING is enabled." ON) +option(JNI_HPP_BUILD_EXAMPLES "Build and run examples" ON) + +add_library(jni_hpp INTERFACE) +add_library(Mapbox::JNI ALIAS jni_hpp) + +target_include_directories(jni_hpp INTERFACE include) +target_compile_features(jni_hpp INTERFACE cxx_std_14) + +if(JNI_HPP_BUILD_TESTS) + enable_testing() + add_subdirectory(test) +endif() + +if(JNI_HPP_BUILD_EXAMPLES) + enable_testing() + add_subdirectory(examples) +endif() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..e69de29 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..5b6ab01 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,7 @@ +add_executable(low_level low_level.cpp) +target_link_libraries(low_level Mapbox::JNI) +target_include_directories(low_level PRIVATE android) + +add_executable(high_level high_level.cpp) +target_link_libraries(high_level Mapbox::JNI) +target_include_directories(high_level PRIVATE android)