Skip to content

Instantly share code, notes, and snippets.

@qamarelsafadi
Created June 16, 2023 12:09
Show Gist options
  • Save qamarelsafadi/00f00258da49d4005a7d478a151ab200 to your computer and use it in GitHub Desktop.
Save qamarelsafadi/00f00258da49d4005a7d478a151ab200 to your computer and use it in GitHub Desktop.
# Sets the minimum version of CMake required to build the native
# library. You should either keep the default value or only pass a
# value of 3.4.0 or lower.
cmake_minimum_required(VERSION 3.4.1)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds it for you.
# Gradle automatically packages shared libraries with your APK.
add_library( # Sets the name of the library.
native-lib
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
# Associated headers in the same location as their source
# file are automatically included.
src/main/native-lib.cpp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment