2018-09-11 15:27:47 -07:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
2016-10-12 09:32:40 -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.
|
2018-08-28 21:54:41 -07:00
|
|
|
load("//tools/build_defs/oss:yoga_defs.bzl", "subdir_glob", "yoga_apple_library", "yoga_apple_test", "yoga_dep")
|
2016-10-12 09:32:40 -07:00
|
|
|
|
2016-12-07 05:12:11 -08:00
|
|
|
COMPILER_FLAGS = [
|
2017-02-24 21:40:45 -08:00
|
|
|
"-fobjc-arc",
|
|
|
|
"-Wconditional-uninitialized",
|
|
|
|
"-Wdangling-else",
|
|
|
|
"-Wdeprecated-declarations",
|
|
|
|
"-Wimplicit-retain-self",
|
|
|
|
"-Wincomplete-implementation",
|
|
|
|
"-Wobjc-method-access",
|
|
|
|
"-Wobjc-missing-super-calls",
|
|
|
|
"-Wmismatched-return-types",
|
|
|
|
"-Wreturn-type",
|
|
|
|
"-Wno-global-constructors",
|
|
|
|
"-Wno-shadow",
|
|
|
|
"-Wunused-const-variable",
|
|
|
|
"-Wunused-function",
|
|
|
|
"-Wunused-property-ivar",
|
|
|
|
"-Wunused-result",
|
|
|
|
"-Wunused-value",
|
2016-11-11 15:01:16 -08:00
|
|
|
]
|
2016-10-14 14:52:22 -07:00
|
|
|
|
2018-04-14 12:39:23 -07:00
|
|
|
yoga_apple_library(
|
2017-02-24 21:40:45 -08:00
|
|
|
name = "YogaKit",
|
|
|
|
srcs = glob(["Source/**/*.m"]),
|
2018-03-02 16:56:47 -08:00
|
|
|
header_namespace = "",
|
2017-12-13 14:43:19 -08:00
|
|
|
exported_headers = subdir_glob(
|
|
|
|
[
|
|
|
|
("", "Source/**/*.h"),
|
|
|
|
("Source", "**/*.h"),
|
|
|
|
],
|
|
|
|
prefix = "YogaKit",
|
|
|
|
),
|
2017-09-25 10:10:19 -07:00
|
|
|
compiler_flags = COMPILER_FLAGS,
|
2017-02-24 21:40:45 -08:00
|
|
|
frameworks = [
|
|
|
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
|
|
|
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
|
|
|
],
|
2017-12-13 14:43:19 -08:00
|
|
|
header_path_prefix = "",
|
2017-11-07 14:33:02 -08:00
|
|
|
link_whole = True,
|
2017-02-24 21:40:45 -08:00
|
|
|
visibility = ["PUBLIC"],
|
|
|
|
deps = [
|
|
|
|
yoga_dep(":yoga"),
|
|
|
|
],
|
2016-10-14 17:38:27 -07:00
|
|
|
)
|
2016-10-14 13:25:24 -07:00
|
|
|
|
2018-04-14 12:39:23 -07:00
|
|
|
yoga_apple_test(
|
2017-02-24 21:40:45 -08:00
|
|
|
name = "YogaKitTests",
|
|
|
|
srcs = glob(["Tests/**/*.m"]),
|
|
|
|
compiler_flags = COMPILER_FLAGS,
|
|
|
|
frameworks = [
|
|
|
|
"$PLATFORM_DIR/Developer/Library/Frameworks/XCTest.framework",
|
2017-03-01 20:41:22 -08:00
|
|
|
"$SDKROOT/System/Library/Frameworks/CoreGraphics.framework",
|
2017-02-24 21:40:45 -08:00
|
|
|
],
|
|
|
|
info_plist = "Tests/Info.plist",
|
|
|
|
visibility = ["PUBLIC"],
|
|
|
|
deps = [
|
|
|
|
":YogaKit",
|
|
|
|
],
|
2016-10-14 17:38:27 -07:00
|
|
|
)
|