2016-09-22 16:22:34 -07:00
|
|
|
# Copyright (c) 2014-present, Facebook, Inc.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This source code is licensed under the BSD-style license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
# of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
2016-12-15 12:44:19 -08:00
|
|
|
include_defs('//YOGA_DEFS')
|
|
|
|
|
|
|
|
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ['-std=c++11']
|
|
|
|
|
2016-09-22 16:22:34 -07:00
|
|
|
csharp_library(
|
2016-12-07 05:12:11 -08:00
|
|
|
name = 'yogalibnet46',
|
2016-12-02 11:18:16 -08:00
|
|
|
dll_name = 'Facebook.Yoga.dll',
|
2016-09-22 16:22:34 -07:00
|
|
|
framework_ver = 'net46',
|
|
|
|
srcs = glob(['**/*.cs']),
|
|
|
|
)
|
|
|
|
|
|
|
|
csharp_library(
|
2016-12-07 05:12:11 -08:00
|
|
|
name = 'yogalibnet45',
|
2016-12-02 11:18:16 -08:00
|
|
|
dll_name = 'Facebook.Yoga.dll',
|
2016-09-22 16:22:34 -07:00
|
|
|
framework_ver = 'net45',
|
|
|
|
srcs = glob(['**/*.cs']),
|
|
|
|
)
|
2016-12-15 12:44:19 -08:00
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name = 'yoganet',
|
|
|
|
soname = 'libyoga.$(ext)',
|
|
|
|
srcs = glob(['Yoga/YGInterop.cpp']),
|
|
|
|
compiler_flags = COMPILER_FLAGS,
|
|
|
|
link_style = 'static',
|
|
|
|
link_whole = True,
|
|
|
|
deps = [yoga_dep(':yoga')],
|
|
|
|
visibility = ['PUBLIC'],
|
|
|
|
)
|
2016-12-16 06:53:47 -08:00
|
|
|
|
|
|
|
with allow_unsafe_import():
|
|
|
|
import os
|
|
|
|
|
|
|
|
if os.path.isdir('/Applications/Xcode.app'):
|
|
|
|
yoganet_ios_srcs = []
|
|
|
|
for arch in ['iphonesimulator-x86_64', 'iphoneos-arm64', 'iphoneos-armv7']:
|
|
|
|
name = 'yoganet-' + arch
|
|
|
|
yoganet_ios_srcs.append(':' + name)
|
|
|
|
genrule(
|
|
|
|
name = name,
|
|
|
|
srcs = [
|
|
|
|
yoga_dep(':yoga#%s,static' % arch),
|
|
|
|
yoga_dep('YogaKit:YogaKit#%s,static' % arch),
|
|
|
|
yoga_dep('csharp:yoganet#%s,static' % arch),
|
|
|
|
],
|
|
|
|
out = 'libyoga-%s.a' % arch,
|
|
|
|
cmd = 'libtool -static -o $OUT $SRCS',
|
|
|
|
visibility = [yoga_dep('csharp:yoganet-ios')],
|
|
|
|
)
|
|
|
|
|
|
|
|
genrule(
|
|
|
|
name = 'yoganet-ios',
|
|
|
|
srcs = yoganet_ios_srcs,
|
|
|
|
out = 'libyoga.a',
|
|
|
|
cmd = 'lipo $SRCS -create -output $OUT',
|
|
|
|
visibility = ['PUBLIC'],
|
|
|
|
)
|