blob: 70ad9659d51bfb4a2ce33cb7e13c70cb6cc4ae22 [file] [log] [blame]
Don Turnerfda67012018-01-19 18:10:25 +00001cmake_minimum_required(VERSION 3.4.1)
2
Don Turner94fe4852018-07-03 08:42:09 +01003# Include GoogleTest library
Don Turnereb236cc2018-07-03 08:33:05 +01004set(GOOGLETEST_ROOT ${ANDROID_NDK}/sources/third_party/googletest)
Don Turnerfda67012018-01-19 18:10:25 +00005add_library(gtest STATIC ${GOOGLETEST_ROOT}/src/gtest_main.cc ${GOOGLETEST_ROOT}/src/gtest-all.cc)
6target_include_directories(gtest PRIVATE ${GOOGLETEST_ROOT})
7target_include_directories(gtest PUBLIC ${GOOGLETEST_ROOT}/include)
8
Don Turner94fe4852018-07-03 08:42:09 +01009# Include Oboe sources
10set (OBOE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
11add_subdirectory(${OBOE_DIR} ./oboe-bin)
12include_directories(${OBOE_DIR}/include)
13
14# Build the test binary
15add_executable(testOboe
16 testUtilities.cpp
17 testStreamClosedMethods.cpp
Don Turnerff649d02018-07-04 18:35:02 +010018 testXRunBehaviour.cpp
Don Turner94fe4852018-07-03 08:42:09 +010019 )
20target_link_libraries(testOboe gtest oboe)