• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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        jni_bridge.cpp
30        ${SAMPLE_ROOT_DIR}/debug-utils/trace.cpp)
31target_include_directories(liveEffect
32    PRIVATE
33        ${SAMPLE_ROOT_DIR}/debug-utils
34        ${OBOE_DIR}/include)
35target_link_libraries(liveEffect
36    PRIVATE
37        oboe
38        android
39        atomic
40        log)
41target_link_options(liveEffect PRIVATE "-Wl,-z,max-page-size=16384")
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