2018-09-11 15:27:47 -07:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
2017-04-19 12:22:09 -07:00
|
|
|
#
|
2018-02-16 18:24:55 -08:00
|
|
|
# This source code is licensed under the MIT license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree.
|
2017-04-19 12:22:09 -07:00
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.4.1)
|
|
|
|
|
|
|
|
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
|
|
|
|
|
|
# configure import libs
|
|
|
|
set(yogacore_DIR ${CMAKE_SOURCE_DIR}/..)
|
|
|
|
set(build_DIR ${CMAKE_SOURCE_DIR}/build)
|
|
|
|
|
|
|
|
set(yogacore_build_DIR ${build_DIR}/yogacore/${ANDROID_ABI})
|
|
|
|
|
|
|
|
file(MAKE_DIRECTORY ${build_DIR})
|
|
|
|
|
|
|
|
add_subdirectory(${yogacore_DIR} ${yogacore_build_DIR})
|
|
|
|
|
|
|
|
add_compile_options(
|
|
|
|
-fno-omit-frame-pointer
|
|
|
|
-fexceptions
|
2019-11-01 11:45:19 -07:00
|
|
|
-fvisibility=hidden
|
2019-11-01 11:45:19 -07:00
|
|
|
-ffunction-sections
|
|
|
|
-fdata-sections
|
2017-04-19 12:22:09 -07:00
|
|
|
-Wall
|
|
|
|
-std=c++11)
|
|
|
|
|
2019-10-08 17:48:32 -07:00
|
|
|
file(GLOB jni_SRC
|
|
|
|
jni/*.cpp)
|
|
|
|
|
2019-11-13 16:36:53 -08:00
|
|
|
file(GLOB yogajni_version_script
|
|
|
|
yogajni.version)
|
|
|
|
|
2019-10-08 17:48:32 -07:00
|
|
|
add_library(yoga SHARED ${jni_SRC})
|
2017-04-19 12:22:09 -07:00
|
|
|
|
|
|
|
target_include_directories(yoga PRIVATE
|
|
|
|
${yogacore_DIR})
|
|
|
|
|
2019-11-13 16:36:53 -08:00
|
|
|
target_link_libraries(yoga -Wl,--gc-sections,--version-script=${yogajni_version_script} yogacore)
|