blob: 8511d2698c48d02e7b03599f75daff2c718e18a1 [file] [log] [blame]
Don Turnerfda67012018-01-19 18:10:25 +00001cmake_minimum_required(VERSION 3.4.1)
2
Don Turner6ee9cf32018-07-12 18:09:59 +01003# TODO: Remove this line and inherit it from the host environment
Phil Burk4a42e112018-08-24 10:11:52 -07004set(ANDROID_NDK $ENV{HOME}/Library/Android/sdk/ndk-bundle)
Don Turner6ee9cf32018-07-12 18:09:59 +01005
Don Turner94fe4852018-07-03 08:42:09 +01006# Include GoogleTest library
Don Turnereb236cc2018-07-03 08:33:05 +01007set(GOOGLETEST_ROOT ${ANDROID_NDK}/sources/third_party/googletest)
Don Turnerfda67012018-01-19 18:10:25 +00008add_library(gtest STATIC ${GOOGLETEST_ROOT}/src/gtest_main.cc ${GOOGLETEST_ROOT}/src/gtest-all.cc)
9target_include_directories(gtest PRIVATE ${GOOGLETEST_ROOT})
10target_include_directories(gtest PUBLIC ${GOOGLETEST_ROOT}/include)
11
Don Turner94fe4852018-07-03 08:42:09 +010012# Include Oboe sources
13set (OBOE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
14add_subdirectory(${OBOE_DIR} ./oboe-bin)
15include_directories(${OBOE_DIR}/include)
16
17# Build the test binary
18add_executable(testOboe
19 testUtilities.cpp
20 testStreamClosedMethods.cpp
Don Turner0412fd52018-07-18 17:08:34 +010021 testStreamStates.cpp
Don Turner7dcf25d2018-07-18 15:21:07 +010022 testStreamOpen.cpp
Don Turnerff649d02018-07-04 18:35:02 +010023 testXRunBehaviour.cpp
Don Turner94fe4852018-07-03 08:42:09 +010024 )
Don Turnerba5a01b2018-07-10 18:40:20 +010025target_link_libraries(testOboe gtest oboe)