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(libfb_DIR ${CMAKE_SOURCE_DIR}/../lib/fb/src/main/cpp)
|
|
|
|
set(yogacore_DIR ${CMAKE_SOURCE_DIR}/..)
|
|
|
|
|
|
|
|
set(build_DIR ${CMAKE_SOURCE_DIR}/build)
|
|
|
|
|
|
|
|
set(libfb_build_DIR ${build_DIR}/libfb/${ANDROID_ABI})
|
|
|
|
set(yogacore_build_DIR ${build_DIR}/yogacore/${ANDROID_ABI})
|
|
|
|
|
|
|
|
file(MAKE_DIRECTORY ${build_DIR})
|
|
|
|
|
|
|
|
add_subdirectory(${libfb_DIR} ${libfb_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
|
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)
|
|
|
|
|
|
|
|
add_library(yoga SHARED ${jni_SRC})
|
2017-04-19 12:22:09 -07:00
|
|
|
|
|
|
|
target_include_directories(yoga PRIVATE
|
|
|
|
${libfb_DIR}/include
|
|
|
|
${yogacore_DIR})
|
|
|
|
|
|
|
|
target_link_libraries(yoga yogacore fb)
|