Skip to content

Commit 2879a17

Browse files
authored
Add a flag allowing one to disable using pkgconfig (#274)
1 parent 61d03ba commit 2879a17

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

sdl2.cabal

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ flag recent-ish
6161
description: Use features from a more recent libsdl2 release.
6262
default: True
6363
manual: False
64+
65+
flag pkgconfig
66+
description: Use pkgconfig to sort out SDL2 dependency
67+
default: True
68+
manual: True
6469

6570
library
6671
-- ghc-options: -Wall -Werror
@@ -130,11 +135,13 @@ library
130135
if flag(recent-ish)
131136
cpp-options:
132137
-DRECENT_ISH
133-
pkgconfig-depends:
134-
sdl2 >= 2.0.10
138+
if flag(pkgconfig)
139+
pkgconfig-depends:
140+
sdl2 >= 2.0.10
135141
else
136-
pkgconfig-depends:
137-
sdl2 >= 2.0.6
142+
if flag(pkgconfig)
143+
pkgconfig-depends:
144+
sdl2 >= 2.0.6
138145

139146
build-depends:
140147
base >= 4.7 && < 5,

0 commit comments

Comments
 (0)