blob: a414d9c97d62b76ac9dc3b06fb764934151a5f78 [file] [log] [blame]
Phil Burk0433d8f2018-11-21 16:41:25 -08001cmake_minimum_required(VERSION 3.4.1)
2
3set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -std=c++14")
4set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")
5set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
6
7link_directories(${CMAKE_CURRENT_LIST_DIR}/..)
8
9file(GLOB_RECURSE app_native_sources src/main/cpp/*)
10
11### Name must match loadLibrary() call in MainActivity.java
12add_library(oboetester SHARED ${app_native_sources})
13
14### INCLUDE OBOE LIBRARY ###
15
16# Set the path to the Oboe library directory
17set (OBOE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
18
19# Add the Oboe library as a subproject. Since Oboe is an out-of-tree source library we must also
20# specify a binary directory
21add_subdirectory(${OBOE_DIR} ./oboe-bin)
22
23# Specify the path to the Oboe header files and the source.
24include_directories(
25 ${OBOE_DIR}/include
26 ${OBOE_DIR}/src
27)
28
29### END OBOE INCLUDE SECTION ###
30
31# link to oboe
32target_link_libraries(oboetester log oboe atomic)
33
Phil Burk652d5f62019-07-29 11:27:17 -070034# bump 2 to resync CMake