1cmake_minimum_required(VERSION 3.4.1) 2 3set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -std=c++17 -fvisibility=hidden") 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 9# Increment this number when adding files to OboeTester => 105 10# The change in this file will help Android Studio resync 11# and generate new build files that reference the new code. 12file(GLOB_RECURSE app_native_sources src/main/cpp/*) 13 14### Name must match loadLibrary() call in MainActivity.java 15add_library(oboetester SHARED ${app_native_sources}) 16 17### INCLUDE OBOE LIBRARY ### 18 19# Set the path to the Oboe library directory 20set (OBOE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..) 21 22# Add the Oboe library as a subproject. Since Oboe is an out-of-tree source library we must also 23# specify a binary directory 24add_subdirectory(${OBOE_DIR} ./oboe-bin) 25 26# Specify the path to the Oboe header files and the source. 27include_directories( 28 ${OBOE_DIR}/include 29 ${OBOE_DIR}/src 30) 31 32### END OBOE INCLUDE SECTION ### 33 34# link to oboe 35target_link_libraries(oboetester log oboe atomic) 36target_link_options(oboetester PRIVATE "-Wl,-z,max-page-size=16384") 37