-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathh-raylib.cabal
365 lines (303 loc) · 8.54 KB
/
h-raylib.cabal
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
cabal-version: 2.4
name: h-raylib
version: 5.5.2.1
synopsis: Raylib bindings for Haskell
category: graphics
description:
This library contains Haskell bindings to the Raylib library. It supports Windows, Mac, Linux, and BSD.
bug-reports: https://github.com/Anut-py/h-raylib/issues
license: Apache-2.0
license-file: LICENSE
author: Anut
maintainer: Anut
extra-doc-files:
CHANGELOG.md
CONTRIBUTING.md
DOCUMENTATION.md
README.md
-- Requires >= 9.6.5 on Mac because this bug fix is required: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12079
-- Works with >= 9.2.8 on Windows
tested-with: GHC >= 9.6.5
extra-source-files:
default.nix
flake.nix
lib/**/*.c
lib/**/*.h
lib/**/*.m
raygui/src/*.h
raygui/styles/**/*.h
raylib/**/*.c
raylib/**/*.h
raylib/**/*.m
data-files:
examples/**/*.frag
examples/**/*.mtl
examples/**/*.obj
examples/**/*.png
examples/**/*.ttf
examples/**/*.txt
examples/**/*.vert
examples/**/*.xm
source-repository head
type: git
location: git://github.com/Anut-py/h-raylib.git
flag detect-platform
description:
Detect platform and automatically add platform-specific configuration
default: True
manual: True
flag platform-windows
description: Build for Windows
default: False
manual: True
flag platform-mac
description: Build for macOS/OSX
default: False
manual: True
flag platform-linux
description: Build for Linux
default: False
manual: True
flag platform-bsd
description: Build for FreeBSD, OpenBSD, or NetBSD
default: False
manual: True
flag platform-nixos
description: Build for Nix (use external GLFW)
default: False
manual: True
flag platform-web
description: Build for web
default: False
manual: True
flag mingw-cross
description:
Cross-compiling for mingw (used in combination with Windows)
default: False
manual: True
flag examples
description: Build the example projects
default: False
manual: True
flag ghci
description: Used when running the program in GHCi
default: False
manual: True
common example-options
default-language: Haskell2010
if !flag(examples)
buildable: False
else
build-depends:
, base
, h-raylib
other-modules: Paths_h_raylib
autogen-modules: Paths_h_raylib
other-extensions:
BangPatterns
TemplateHaskell
ghc-options: -Wall
if flag(platform-web)
ghc-options:
-no-hs-main -optl-mexec-model=reactor
"-optl-Wl,--export=hs_init,--import-memory,--shared-memory,--max-memory=67108864,--no-check-features"
"-optl-Wl,--export=startup,--export=mainLoop,--export=shouldClose,--export=teardown"
-- core
executable basic-window
import: example-options
hs-source-dirs: examples/basic-window/src
main-is: Main.hs
executable basic-callbacks
import: example-options
hs-source-dirs: examples/basic-callbacks/src
main-is: Main.hs
executable basic-automation-events
import: example-options
hs-source-dirs: examples/basic-automation-events/src
main-is: Main.hs
executable first-person-camera
import: example-options
hs-source-dirs: examples/first-person-camera/src
main-is: Main.hs
executable camera-ray-collision
import: example-options
hs-source-dirs: examples/camera-ray-collision/src
main-is: Main.hs
-- textures
executable basic-images
import: example-options
hs-source-dirs: examples/basic-images/src
main-is: Main.hs
executable bunnymark
import: example-options
hs-source-dirs: examples/bunnymark/src
main-is: Main.hs
-- text
executable custom-font-text
import: example-options
hs-source-dirs: examples/custom-font-text/src
main-is: Main.hs
-- models
executable basic-models
import: example-options
hs-source-dirs: examples/basic-models/src
main-is: Main.hs
-- shaders
executable basic-shaders
import: example-options
hs-source-dirs: examples/basic-shaders/src
main-is: Main.hs
executable postprocessing-effects
import: example-options
hs-source-dirs: examples/postprocessing-effects/src
main-is: Main.hs
-- audio
executable basic-audio
import: example-options
hs-source-dirs: examples/basic-audio/src
main-is: Main.hs
-- rlgl
executable basic-rlgl
import: example-options
hs-source-dirs: examples/basic-rlgl/src
main-is: Main.hs
-- raygui
executable raygui-suite
import: example-options
hs-source-dirs: examples/raygui-suite/src
main-is: Main.hs
library
exposed-modules:
Raylib.Core
Raylib.Core.Audio
Raylib.Core.Camera
Raylib.Core.Models
Raylib.Core.Shapes
Raylib.Core.Text
Raylib.Core.Textures
Raylib.Internal
Raylib.Internal.Foreign
Raylib.Types
Raylib.Types.Core
Raylib.Types.Core.Audio
Raylib.Types.Core.Camera
Raylib.Types.Core.Models
Raylib.Types.Core.Text
Raylib.Types.Core.Textures
Raylib.Types.Util.GUI
Raylib.Types.Util.RLGL
Raylib.Util
Raylib.Util.Camera
Raylib.Util.Colors
Raylib.Util.GUI
Raylib.Util.GUI.Styles
Raylib.Util.Lenses
Raylib.Util.Math
Raylib.Util.RLGL
other-modules:
Raylib.Internal.TH
Raylib.Internal.Web.Native
Raylib.Internal.Web.Processable
build-depends:
, base >=4.0 && <4.22
, bytestring >=0.11.0 && <0.13
, containers >=0.6.0 && <0.7
, exceptions >=0.10.4 && <0.11
, lens >=4.0 && <5.4
, linear >=1.22 && <1.24
, template-haskell >=2.16.0.0 && <2.23.0.0
, text >=2.0 && <2.2
hs-source-dirs: src
default-language: Haskell2010
other-extensions:
CPP
ConstrainedClassMethods
DeriveAnyClass
FlexibleInstances
ForeignFunctionInterface
PatternSynonyms
ScopedTypeVariables
TemplateHaskell
TemplateHaskellQuotes
ghc-options: -Wall
if (flag(platform-windows) || (flag(detect-platform) && os(windows)))
if flag(mingw-cross)
extra-libraries:
opengl32
gdi32
winmm
shell32
gcc
if impl(ghc <9.4.1)
extra-libraries: gcc_eh
else
extra-libraries:
opengl32
gdi32
winmm
shell32
if impl(ghc <9.4.1)
extra-libraries: gcc_eh
elif (flag(platform-linux) || (flag(detect-platform) && os(linux)))
extra-libraries:
GL
c
m
pthread
dl
rt
X11
Xinerama
Xcursor
Xrandr
Xi
Xext
cc-options:
-Wno-implicit-function-declaration -Wno-unused-result -D_GLFW_X11
elif (flag(platform-mac) || (flag(detect-platform) && os(osx)))
frameworks: OpenGL Cocoa IOKit CoreVideo CoreAudio CoreFoundation
elif (flag(platform-bsd) || (flag(detect-platform) && ((os(freebsd) || os(netbsd)) || os(openbsd))))
extra-libraries:
GL
pthread
else
-- Unsupported OS, do nothing. If you can get it working on an
-- OS that isn't listed here, please add it here.
if flag(platform-nixos)
extra-libraries: raylib
include-dirs: lib
if flag(platform-web)
cpp-options: -DWEB_FFI
else
cc-options:
-DPLATFORM_DESKTOP_GLFW -Wno-int-to-void-pointer-cast
c-sources:
lib/rgui_bindings.c
lib/rl_bindings.c
lib/rl_internal.c
lib/rlgl_bindings.c
if !flag(platform-nixos)
include-dirs:
raylib/src raylib/src/external/glfw/src
raylib/src/external/glfw/include raygui/src raygui/styles/amber
raygui/styles/ashes raygui/styles/bluish raygui/styles/candy
raygui/styles/cherry raygui/styles/cyber raygui/styles/dark
raygui/styles/enefete raygui/styles/jungle raygui/styles/lavanda
raygui/styles/sunny raygui/styles/terminal
c-sources:
raylib/src/raudio.c
raylib/src/rcore.c
raylib/src/rmodels.c
raylib/src/rshapes.c
raylib/src/rtext.c
raylib/src/rtextures.c
raylib/src/utils.c
if (flag(platform-mac) || (flag(detect-platform) && os(osx)))
-- Use rgflw.m instead of .c on Mac to force objective-c
c-sources: lib/rglfw.m
elif (flag(ghci) && (flag(platform-windows) || (flag(detect-platform) && os(windows))))
c-sources: lib/glfw_patch/rglfw_patch.c
else
c-sources: raylib/src/rglfw.c
if flag(ghci)
cpp-options: -DGHCI