1# 2# Copyright 2018 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# 16cmake_minimum_required(VERSION 3.4.1) 17project(liveEffect LANGUAGES C CXX) 18 19get_filename_component(SAMPLE_ROOT_DIR 20 ${CMAKE_CURRENT_SOURCE_DIR}/../../../.. ABSOLUTE) 21 22### INCLUDE OBOE LIBRARY ### 23set (OBOE_DIR ${SAMPLE_ROOT_DIR}/..) 24add_subdirectory(${OBOE_DIR} ./oboe-bin) 25 26add_library(liveEffect 27 SHARED 28 LiveEffectEngine.cpp 29 FullDuplexStream.cpp 30 jni_bridge.cpp 31 ${SAMPLE_ROOT_DIR}/debug-utils/trace.cpp) 32target_include_directories(liveEffect 33 PRIVATE 34 ${SAMPLE_ROOT_DIR}/debug-utils 35 ${OBOE_DIR}/include) 36target_link_libraries(liveEffect 37 PRIVATE 38 oboe 39 android 40 atomic 41 log) 42 43# Enable optimization flags: if having problems with source level debugging, 44# disable -Ofast ( and debug ), re-enable it after done debugging. 45target_compile_options(liveEffect PRIVATE -Wall -Werror "$<$<CONFIG:RELEASE>:-Ofast>") 46 47