mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2024-11-22 16:57:00 +00:00
Build executables conditionally on features (#41)
* Build executables conditionally on features * Put away examples under a flag
This commit is contained in:
parent
2eddbdfa04
commit
ebd5286e1c
@ -1,3 +1,3 @@
|
|||||||
packages: *.cabal
|
packages: *.cabal
|
||||||
package dear-imgui
|
package dear-imgui
|
||||||
flags: +sdl2 +glfw +opengl2 +opengl3 +vulkan
|
flags: +sdl2 +glfw +opengl2 +opengl3 +vulkan +examples
|
||||||
|
@ -45,6 +45,14 @@ flag glfw
|
|||||||
manual:
|
manual:
|
||||||
True
|
True
|
||||||
|
|
||||||
|
flag examples
|
||||||
|
description:
|
||||||
|
Build executable examples.
|
||||||
|
default:
|
||||||
|
False
|
||||||
|
manual:
|
||||||
|
True
|
||||||
|
|
||||||
common common
|
common common
|
||||||
build-depends:
|
build-depends:
|
||||||
base
|
base
|
||||||
@ -204,6 +212,8 @@ executable test
|
|||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
build-depends: base, sdl2, gl, dear-imgui
|
build-depends: base, sdl2, gl, dear-imgui
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
if (!flag(examples) || !flag(sdl) || !flag(opengl2))
|
||||||
|
buildable: False
|
||||||
|
|
||||||
executable glfw
|
executable glfw
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
@ -211,12 +221,16 @@ executable glfw
|
|||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
build-depends: base, GLFW-b, gl, dear-imgui, managed
|
build-depends: base, GLFW-b, gl, dear-imgui, managed
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
if (!flag(examples) || !flag(glfw) || !flag(opengl2))
|
||||||
|
buildable: False
|
||||||
|
|
||||||
executable readme
|
executable readme
|
||||||
import: common
|
import: common
|
||||||
main-is: Readme.hs
|
main-is: Readme.hs
|
||||||
hs-source-dirs: examples
|
hs-source-dirs: examples
|
||||||
build-depends: sdl2, gl, dear-imgui, managed
|
build-depends: sdl2, gl, dear-imgui, managed
|
||||||
|
if (!flag(examples) || !flag(sdl) || !flag(opengl2))
|
||||||
|
buildable: False
|
||||||
|
|
||||||
executable vulkan
|
executable vulkan
|
||||||
import: common
|
import: common
|
||||||
@ -251,3 +265,5 @@ executable vulkan
|
|||||||
, vulkan-utils
|
, vulkan-utils
|
||||||
^>= 0.4.1
|
^>= 0.4.1
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
if (!flag(examples) || !flag(sdl) || !flag(vulkan))
|
||||||
|
buildable: False
|
||||||
|
Loading…
Reference in New Issue
Block a user