Don Turner | fda6701 | 2018-01-19 18:10:25 +0000 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 3.4.1) |
| 2 | |
Don Turner | f9d2605 | 2019-03-27 16:05:50 +0000 | [diff] [blame^] | 3 | # Usually this file is called from run_tests.sh which requires the $ANDROID_NDK variable to be set so there's no need |
| 4 | # to set it here. Comments below are left in intentionally in case they're useful in future. |
Phil Burk | 25c8715 | 2019-03-26 14:16:51 -0700 | [diff] [blame] | 5 | # This may work on Mac OS. |
| 6 | # set(ANDROID_NDK $ENV{HOME}/Library/Android/sdk/ndk-bundle) |
| 7 | # This may work on Linux. |
| 8 | # set(ANDROID_NDK $ENV{HOME}/Android/sdk/ndk-bundle) |
Don Turner | 6ee9cf3 | 2018-07-12 18:09:59 +0100 | [diff] [blame] | 9 | |
Don Turner | 94fe485 | 2018-07-03 08:42:09 +0100 | [diff] [blame] | 10 | # Include GoogleTest library |
Don Turner | eb236cc | 2018-07-03 08:33:05 +0100 | [diff] [blame] | 11 | set(GOOGLETEST_ROOT ${ANDROID_NDK}/sources/third_party/googletest) |
Don Turner | fda6701 | 2018-01-19 18:10:25 +0000 | [diff] [blame] | 12 | add_library(gtest STATIC ${GOOGLETEST_ROOT}/src/gtest_main.cc ${GOOGLETEST_ROOT}/src/gtest-all.cc) |
| 13 | target_include_directories(gtest PRIVATE ${GOOGLETEST_ROOT}) |
| 14 | target_include_directories(gtest PUBLIC ${GOOGLETEST_ROOT}/include) |
| 15 | |
Don Turner | 94fe485 | 2018-07-03 08:42:09 +0100 | [diff] [blame] | 16 | # Include Oboe sources |
| 17 | set (OBOE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) |
| 18 | add_subdirectory(${OBOE_DIR} ./oboe-bin) |
| 19 | include_directories(${OBOE_DIR}/include) |
| 20 | |
| 21 | # Build the test binary |
| 22 | add_executable(testOboe |
| 23 | testUtilities.cpp |
| 24 | testStreamClosedMethods.cpp |
Don Turner | 0412fd5 | 2018-07-18 17:08:34 +0100 | [diff] [blame] | 25 | testStreamStates.cpp |
Don Turner | 63fef12 | 2018-08-24 12:51:58 +0100 | [diff] [blame] | 26 | testStreamOpen.cpp |
Don Turner | ff649d0 | 2018-07-04 18:35:02 +0100 | [diff] [blame] | 27 | testXRunBehaviour.cpp |
Don Turner | 94fe485 | 2018-07-03 08:42:09 +0100 | [diff] [blame] | 28 | ) |
Don Turner | ba5a01b | 2018-07-10 18:40:20 +0100 | [diff] [blame] | 29 | target_link_libraries(testOboe gtest oboe) |