mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2024-12-22 20:56:36 +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
|
||||
package dear-imgui
|
||||
flags: +sdl2 +glfw +opengl2 +opengl3 +vulkan
|
||||
flags: +sdl2 +glfw +opengl2 +opengl3 +vulkan +examples
|
||||
|
@ -45,6 +45,14 @@ flag glfw
|
||||
manual:
|
||||
True
|
||||
|
||||
flag examples
|
||||
description:
|
||||
Build executable examples.
|
||||
default:
|
||||
False
|
||||
manual:
|
||||
True
|
||||
|
||||
common common
|
||||
build-depends:
|
||||
base
|
||||
@ -204,6 +212,8 @@ executable test
|
||||
default-language: Haskell2010
|
||||
build-depends: base, sdl2, gl, dear-imgui
|
||||
ghc-options: -Wall
|
||||
if (!flag(examples) || !flag(sdl) || !flag(opengl2))
|
||||
buildable: False
|
||||
|
||||
executable glfw
|
||||
main-is: Main.hs
|
||||
@ -211,12 +221,16 @@ executable glfw
|
||||
default-language: Haskell2010
|
||||
build-depends: base, GLFW-b, gl, dear-imgui, managed
|
||||
ghc-options: -Wall
|
||||
if (!flag(examples) || !flag(glfw) || !flag(opengl2))
|
||||
buildable: False
|
||||
|
||||
executable readme
|
||||
import: common
|
||||
main-is: Readme.hs
|
||||
hs-source-dirs: examples
|
||||
build-depends: sdl2, gl, dear-imgui, managed
|
||||
if (!flag(examples) || !flag(sdl) || !flag(opengl2))
|
||||
buildable: False
|
||||
|
||||
executable vulkan
|
||||
import: common
|
||||
@ -251,3 +265,5 @@ executable vulkan
|
||||
, vulkan-utils
|
||||
^>= 0.4.1
|
||||
ghc-options: -Wall
|
||||
if (!flag(examples) || !flag(sdl) || !flag(vulkan))
|
||||
buildable: False
|
||||
|
Loading…
Reference in New Issue
Block a user