CMakeLists.txt (1982B)
1 2 # For more information about using CMake with Android Studio, read the 3 # documentation: https://d.android.com/studio/projects/add-native-code.html. 4 # For more examples on how to use CMake, see https://github.com/android/ndk-samples. 5 6 # Sets the minimum CMake version required for this project. 7 cmake_minimum_required(VERSION 3.22.1) 8 9 # Declares the project name. The project name can be accessed via ${ PROJECT_NAME}, 10 # Since this is the top level CMakeLists.txt, the project name is also accessible 11 # with ${CMAKE_PROJECT_NAME} (both CMake variables are in-sync within the top level 12 # build script scope). 13 project("verification") 14 15 # Creates and names a library, sets it as either STATIC 16 # or SHARED, and provides the relative paths to its source code. 17 # You can define multiple libraries, and CMake builds them for you. 18 # Gradle automatically packages shared libraries with your APK. 19 # 20 # In this top level CMakeLists.txt, ${CMAKE_PROJECT_NAME} is used to define 21 # the target library name; in the sub-module's CMakeLists.txt, ${PROJECT_NAME} 22 # is preferred for the same purpose. 23 # 24 # In order to load a library into your app from Java/Kotlin, you must call 25 # System.loadLibrary() and pass the name of the library defined here; 26 # for GameActivity/NativeActivity derived applications, the same library name must be 27 # used in the AndroidManifest.xml file. 28 add_library(${CMAKE_PROJECT_NAME} SHARED 29 # List C/C++ source files with relative paths to this CMakeLists.txt. 30 verification.cpp) 31 32 find_package(sodium REQUIRED CONFIG) 33 34 # Specifies libraries CMake should link to your target library. You 35 # can link libraries from various origins, such as libraries defined in this 36 # build script, prebuilt third-party libraries, or Android system libraries. 37 target_link_libraries(${CMAKE_PROJECT_NAME} 38 # List libraries link to the target library 39 android 40 sodium::sodium-static 41 log) 42 43 # include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/libsodium/include )