blob: 0586509f88d5a19e2108aa691e85a4dc8d7b7ea5 [file] [log] [blame]
Don Turnerc700fc82018-05-24 17:59:50 +01001cmake_minimum_required(VERSION 3.4.1)
2
3
4### INCLUDE OBOE LIBRARY ###
5
6# Set the path to the Oboe library directory
7set (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
11add_subdirectory(${OBOE_DIR} ./oboe-bin)
12
13# Include the Oboe headers
14include_directories(${OBOE_DIR}/include)
15
16### END OBOE INCLUDE SECTION ###
17
18
19add_library( megadrone SHARED
20 src/main/cpp/native-lib.cpp
Don Turner495af0e2018-05-25 17:09:54 +010021 src/main/cpp/AudioEngine.cpp
22 src/main/cpp/Oscillator.cpp
23 )
Don Turnerc700fc82018-05-24 17:59:50 +010024
25target_link_libraries( megadrone log oboe )
26
27# Make the Oboe public headers available to our app
28include_directories (${OBOE_DIR}/include)
29
Don Turner495af0e2018-05-25 17:09:54 +010030# Append compiler optimization flags to both the debug and release build variants
Don Turnerc700fc82018-05-24 17:59:50 +010031set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Ofast")
Don Turner495af0e2018-05-25 17:09:54 +010032set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast")
33