Skip to content

Commit

Permalink
Add a flag allowing one to disable using pkgconfig (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
expipiplus1 authored Oct 4, 2022
1 parent 61d03ba commit 2879a17
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions sdl2.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ flag recent-ish
description: Use features from a more recent libsdl2 release.
default: True
manual: False

flag pkgconfig
description: Use pkgconfig to sort out SDL2 dependency
default: True
manual: True

library
-- ghc-options: -Wall -Werror
Expand Down Expand Up @@ -130,11 +135,13 @@ library
if flag(recent-ish)
cpp-options:
-DRECENT_ISH
pkgconfig-depends:
sdl2 >= 2.0.10
if flag(pkgconfig)
pkgconfig-depends:
sdl2 >= 2.0.10
else
pkgconfig-depends:
sdl2 >= 2.0.6
if flag(pkgconfig)
pkgconfig-depends:
sdl2 >= 2.0.6

build-depends:
base >= 4.7 && < 5,
Expand Down

0 comments on commit 2879a17

Please sign in to comment.