forked from SFML/SFML
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUCK
129 lines (114 loc) · 3.5 KB
/
BUCK
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
load('//:subdir_glob.bzl', 'subdir_glob')
load('//:buckaroo_macros.bzl', 'buckaroo_deps', 'buckaroo_deps_from_package')
macos_preprocessor_flags = [
'-DSFML_OS_MACOSX=1',
'-DSFML_BUILD_FRAMEWORKS=1',
]
linux_preprocessor_flags = [
'-DSFML_OS_LINUX=1',
]
unix_srcs = glob([
'src/SFML/**/Unix/**/*.cpp',
])
egl_srcs = glob([
'src/SFML/**/Egl*.cpp',
'src/SFML/**/Egl*.cpp',
'src/SFML/**/EGL*.cpp',
])
linux_srcs = glob([
'src/SFML/**/Unix/**/*.cpp',
])
macos_srcs = glob([
'src/SFML/System/Unix/**/*.cpp',
'src/SFML/**/OSX/**/*.cpp',
'src/SFML/**/OSX/**/*.mm',
'src/SFML/**/OSX/**/*.m',
])
openbsd_srcs = glob([
'src/SFML/**/OpenBSD/**/*.cpp',
])
freebsd_srcs = glob([
'src/SFML/**/FreeBSD/**/*.cpp',
])
windows_srcs = glob([
'src/SFML/Main/MainWin32.cpp',
'src/SFML/**/Win32/**/*.cpp',
])
android_srcs = glob([
'src/SFML/Main/MainAndroid.cpp',
'src/SFML/Main/SFMLActivity.cpp',
'src/SFML/**/Android/**/*.cpp',
])
ios_srcs = glob([
'src/SFML/**/iOS/**/*.mm',
'src/SFML/**/iOS/**/*.cpp',
])
platform_srcs = unix_srcs + linux_srcs + macos_srcs + \
windows_srcs + freebsd_srcs + android_srcs + \
openbsd_srcs + egl_srcs + ios_srcs
macos_deps = \
buckaroo_deps_from_package('github.com/buckaroo-pm/host-core-foundation') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/host-core-services') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/host-core-graphics') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/host-io-kit') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/host-app-kit') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/host-carbon') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/host-cocoa') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/host-opengl') + \
[ '//extlibs/libs-osx/Frameworks:openal' ]
linux_deps = \
buckaroo_deps_from_package('github.com/buckaroo-pm/host-pthread') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/pkg-config-x11') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/pkg-config-xrandr') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/pkg-config-udev') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/pkg-config-gl') + \
buckaroo_deps_from_package('github.com/buckaroo-pm/pkg-config-openal')
cxx_library(
name = 'sfml',
header_namespace = 'SFML',
exported_headers = subdir_glob([
('include/SFML', '**/*.hpp'),
('include/SFML', '**/*.h'),
('include/SFML', '**/*.inl'),
]),
headers = subdir_glob([
('src/SFML', '**/*.hpp'),
('src/SFML', '**/*.h'),
]),
platform_preprocessor_flags = [
('macos.*', macos_preprocessor_flags),
('linux.*', linux_preprocessor_flags),
],
srcs = glob([
'src/SFML/**/*.cpp',
], exclude = platform_srcs),
platform_srcs = [
('default', unix_srcs),
('linux.*', linux_srcs),
('macos.*', macos_srcs),
('windows.*', windows_srcs),
('android.*', android_srcs),
('iphone.*', ios_srcs),
],
exported_preprocessor_flags = [
'-DHAVE_PROTOTYPES=1',
],
deps =
buckaroo_deps_from_package('github.com/buckaroo-pm/xiph-ogg') +
buckaroo_deps_from_package('github.com/buckaroo-pm/xiph-flac') +
buckaroo_deps_from_package('github.com/buckaroo-pm/xiph-vorbis') +
buckaroo_deps_from_package('github.com/buckaroo-pm/freetype2') + [
'//extlibs/headers/stb_image:stb_image',
'//extlibs/headers/AL:al',
],
platform_deps = [
('macos.*', macos_deps),
('linux.*', linux_deps),
],
licenses = [
'license.md',
],
visibility = [
'PUBLIC',
],
)