1# 2# Copyright 2022 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17cmake_minimum_required(VERSION 3.4.1) 18 19# Set the path to the Oboe library directory 20set (OBOE_DIR ../../../../../) 21#message("OBOE_DIR = " + ${OBOE_DIR}) 22 23add_subdirectory(${OBOE_DIR} ./oboe-bin) 24 25# include folders 26include_directories( 27 ${OBOE_DIR}/include 28 ${CMAKE_CURRENT_LIST_DIR} 29) 30 31# App specific sources 32set (APP_SOURCES 33 SimpleNoiseMaker.cpp 34 MinimalOboeJNI.cpp 35 ) 36 37# Build the minimaloboe (native) library 38add_library(minimaloboe SHARED 39 ${APP_SOURCES} 40 ) 41 42# Enable optimization flags: if having problems with source level debugging, 43# disable -Ofast ( and debug ), re-enable after done debugging. 44target_compile_options(minimaloboe PRIVATE -Wall -Werror "$<$<CONFIG:RELEASE>:-Ofast>") 45 46target_link_libraries( # Specifies the target library. 47 minimaloboe 48 oboe 49 50 # Links the target library to the log library 51 # included in the NDK. 52 log) 53target_link_options(minimaloboe PRIVATE "-Wl,-z,max-page-size=16384") 54