Don Turner | 0db81a4 | 2018-03-29 17:48:12 +0100 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 3.4.1) |
| 2 | |
| 3 | include_directories(third_party) |
| 4 | |
| 5 | include_directories(src/main/cpp/) |
| 6 | |
| 7 | add_library( native-lib |
| 8 | SHARED |
| 9 | |
| 10 | # main game files |
| 11 | src/main/cpp/native-lib.cpp |
| 12 | src/main/cpp/Game.cpp |
| 13 | |
| 14 | # audio engine |
| 15 | src/main/cpp/audio/SoundRecording.cpp |
| 16 | src/main/cpp/audio/Mixer.cpp |
| 17 | |
| 18 | # UI engine |
| 19 | src/main/cpp/ui/OpenGLFunctions.cpp |
| 20 | |
| 21 | # utility functions |
| 22 | src/main/cpp/utils/logging.h |
| 23 | src/main/cpp/utils/UtilityFunctions.cpp |
| 24 | |
| 25 | ) |
| 26 | |
| 27 | # Specifies libraries CMake should link to your target library. You |
| 28 | # can link multiple libraries, such as libraries you define in this |
| 29 | # build script, prebuilt third-party libraries, or system libraries. |
| 30 | |
| 31 | target_link_libraries( native-lib |
| 32 | log |
| 33 | android |
| 34 | oboe |
| 35 | GLESv2 |
| 36 | ) |
| 37 | |
| 38 | # Set the path to the Oboe directory. |
| 39 | set (OBOE_DIR ../..) |
| 40 | |
| 41 | # Add the Oboe library as a subdirectory in your project. |
| 42 | add_subdirectory (${OBOE_DIR} ./oboe-bin) |
| 43 | |
| 44 | # Specify the path to the Oboe header files. |
| 45 | include_directories (${OBOE_DIR}/include) |