Don Turner | c700fc8 | 2018-05-24 17:59:50 +0100 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 3.4.1) |
| 2 | |
| 3 | |
| 4 | ### INCLUDE OBOE LIBRARY ### |
| 5 | |
| 6 | # Set the path to the Oboe library directory |
| 7 | set (OBOE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..) |
| 8 | |
| 9 | # Add the Oboe library as a subproject. Since Oboe is an out-of-tree source library we must also |
| 10 | # specify a binary directory |
| 11 | add_subdirectory(${OBOE_DIR} ./oboe-bin) |
| 12 | |
| 13 | # Include the Oboe headers |
| 14 | include_directories(${OBOE_DIR}/include) |
| 15 | |
| 16 | ### END OBOE INCLUDE SECTION ### |
| 17 | |
| 18 | |
| 19 | add_library( megadrone SHARED |
| 20 | src/main/cpp/native-lib.cpp |
Don Turner | 495af0e | 2018-05-25 17:09:54 +0100 | [diff] [blame^] | 21 | src/main/cpp/AudioEngine.cpp |
| 22 | src/main/cpp/Oscillator.cpp |
| 23 | ) |
Don Turner | c700fc8 | 2018-05-24 17:59:50 +0100 | [diff] [blame] | 24 | |
| 25 | target_link_libraries( megadrone log oboe ) |
| 26 | |
| 27 | # Make the Oboe public headers available to our app |
| 28 | include_directories (${OBOE_DIR}/include) |
| 29 | |
Don Turner | 495af0e | 2018-05-25 17:09:54 +0100 | [diff] [blame^] | 30 | # Append compiler optimization flags to both the debug and release build variants |
Don Turner | c700fc8 | 2018-05-24 17:59:50 +0100 | [diff] [blame] | 31 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Ofast") |
Don Turner | 495af0e | 2018-05-25 17:09:54 +0100 | [diff] [blame^] | 32 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast") |
| 33 | |