diff --git a/cabal.project b/cabal.project index a5f90d8..b784198 100644 --- a/cabal.project +++ b/cabal.project @@ -1,3 +1,3 @@ packages: *.cabal package dear-imgui - flags: +sdl2 +glfw +opengl2 +opengl3 +vulkan + flags: +sdl2 +glfw +opengl2 +opengl3 +vulkan +examples diff --git a/dear-imgui.cabal b/dear-imgui.cabal index 0bc71b9..de41517 100644 --- a/dear-imgui.cabal +++ b/dear-imgui.cabal @@ -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