Skip to content

Commit 4dd388c

Browse files
author
Anton Pirogov
committed
fixed building problem
1 parent 617fdc6 commit 4dd388c

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

Main.hs renamed to example/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import SDL.Cairo.Canvas
1212

1313
main :: IO ()
1414
main = do
15-
initializeAll
15+
initialize [InitEverything]
1616
window <- createWindow "SDL2 Cairo Canvas" defaultWindow
1717
renderer <- createRenderer window (-1) defaultRenderer
1818

sdl2-cairo.cabal

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- documentation, see http://haskell.org/cabal/users-guide/
33

44
name: sdl2-cairo
5-
version: 0.1.0.0
5+
version: 0.1.0.1
66
synopsis: Binding to render with Cairo on SDL textures
77
and optional convenience drawing API.
88
description: This small library provides convenience functions to draw
@@ -21,6 +21,7 @@ build-type: Simple
2121
cabal-version: >=1.10
2222

2323
library
24+
hs-source-dirs: src
2425
default-language: Haskell2010
2526
exposed-modules: SDL.Cairo, SDL.Cairo.Canvas, SDL.Cairo.Canvas.Interactive
2627
--other-modules:
@@ -32,18 +33,26 @@ library
3233
, random
3334
, time
3435

36+
flag builddemo
37+
description: Build the little demo
38+
default: False
39+
3540
executable sdl2-cairo-test
36-
ghc-options: -fPIC
41+
hs-source-dirs: example
42+
main-is: Main.hs
3743
default-language: Haskell2010
3844
default-extensions: OverloadedStrings
39-
main-is: Main.hs
40-
build-depends: base >=4 && <=5
41-
, sdl2 >=2.0.0
45+
if flag(builddemo)
46+
build-depends: base >=4 && <=5
47+
, sdl2 >=2.0.0 && <2.1
4248
, cairo >=0.13
49+
, sdl2-cairo
4350
, linear
4451
, mtl
4552
, random
4653
, time
54+
else
55+
buildable: False
4756

4857
source-repository head
4958
type: git
File renamed without changes.

SDL/Cairo/Canvas.hs renamed to src/SDL/Cairo/Canvas.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ trivial to port to the Canvas API. Example:
2222
>
2323
>main :: IO ()
2424
>main = do
25-
> initializeAll
25+
> initialize [InitEverything]
2626
> window <- createWindow "SDL2 Cairo Canvas" defaultWindow
2727
> renderer <- createRenderer window (-1) defaultRenderer
2828
> texture <- createCairoTexture' renderer window

SDL/Cairo/Canvas/Interactive.hs renamed to src/SDL/Cairo/Canvas/Interactive.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import SDL.Cairo.Canvas (Canvas, withCanvas)
2121
-- forks a rendering loop and returns a function to draw in this window.
2222
getInteractive :: IO (Canvas () -> IO ())
2323
getInteractive = do
24-
initializeAll
24+
initialize [InitEverything]
2525
w <- createWindow "SDL2 Cairo Canvas Interactive" defaultWindow
2626
r <- createRenderer w (-1) defaultRenderer
2727
t <- createCairoTexture' r w

0 commit comments

Comments
 (0)