forked from TextureGroup/Texture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUCK_PINRemoteImage
executable file
·93 lines (85 loc) · 2.53 KB
/
BUCK_PINRemoteImage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#####################################
# Defines
#####################################
COMMON_PREPROCESSOR_FLAGS = ['-fobjc-arc']
COMMON_LANG_PREPROCESSOR_FLAGS = {
'C': ['-std=gnu99'],
'CXX': ['-std=gnu++11', '-stdlib=libc++'],
}
FLANIMATEDIMAGE_HEADER_FILES = ['Pod/Classes/Image Categories/FLAnimatedImageView+PINRemoteImage.h']
FLANIMATEDIMAGE_SOURCE_FILES = ['Pod/Classes/Image Categories/FLAnimatedImageView+PINRemoteImage.m']
PINCACHE_HEADER_FILES = glob(['Pod/Classes/PINCache/**/*.h'])
PINCACHE_SOURCE_FILES = glob(['Pod/Classes/PINCache/**/*.m'])
#####################################
# PINRemoteImage core targets
#####################################
apple_library(
name = 'PINRemoteImage-Core',
header_path_prefix = 'PINRemoteImage',
exported_headers = glob([
'Pod/Classes/**/*.h',
],
excludes = FLANIMATEDIMAGE_HEADER_FILES + PINCACHE_HEADER_FILES
),
srcs = glob([
'Pod/Classes/**/*.m',
],
excludes = FLANIMATEDIMAGE_SOURCE_FILES + PINCACHE_SOURCE_FILES
),
preprocessor_flags = COMMON_PREPROCESSOR_FLAGS + [
'-DPIN_TARGET_IOS=(TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR || TARGET_OS_TV)',
'-DPIN_TARGET_MAC=(TARGET_OS_MAC)',
],
lang_preprocessor_flags = COMMON_LANG_PREPROCESSOR_FLAGS,
linker_flags = [
'-weak_framework',
'UIKit',
'-weak_framework',
'MobileCoreServices',
'-weak_framework',
'Cocoa',
'-weak_framework',
'CoreServices',
],
frameworks = [
'$SDKROOT/System/Library/Frameworks/ImageIO.framework',
'$SDKROOT/System/Library/Frameworks/Accelerate.framework',
],
visibility = ['PUBLIC'],
)
apple_library(
name = 'PINRemoteImage',
deps = [
':PINRemoteImage-FLAnimatedImage',
':PINRemoteImage-PINCache'
],
visibility = ['PUBLIC'],
)
#####################################
# Other PINRemoteImage targets
#####################################
apple_library(
name = 'PINRemoteImage-FLAnimatedImage',
header_path_prefix = 'PINRemoteImage',
exported_headers = FLANIMATEDIMAGE_HEADER_FILES,
srcs = FLANIMATEDIMAGE_SOURCE_FILES,
preprocessor_flags = COMMON_PREPROCESSOR_FLAGS,
deps = [
':PINRemoteImage-Core',
'//Pods/FLAnimatedImage:FLAnimatedImage'
],
visibility = ['PUBLIC'],
)
apple_library(
name = 'PINRemoteImage-PINCache',
header_path_prefix = 'PINRemoteImage',
exported_headers = PINCACHE_HEADER_FILES,
srcs = PINCACHE_SOURCE_FILES,
preprocessor_flags = COMMON_PREPROCESSOR_FLAGS,
deps = [
':PINRemoteImage-Core',
'//Pods/PINCache:PINCache'
],
visibility = ['PUBLIC'],
)
#TODO WebP variants