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