2021-01-24 15:27:03 +00:00
cabal-version: 3.0
2021-06-30 21:47:23 +00:00
2021-01-24 15:27:03 +00:00
name: dear-imgui
2023-09-10 13:24:33 +00:00
version: 2.2.0
2021-06-30 21:47:23 +00:00
author: Oliver Charles
maintainer: ollie@ocharles.org.uk, aenor.realm@gmail.com
license: BSD-3-Clause
category: Graphics
synopsis: Haskell bindings for Dear ImGui.
description:
The package supports multiple rendering backends.
Set package flags according to your needs.
2021-01-24 15:27:03 +00:00
build-type: Simple
2021-06-30 21:47:23 +00:00
extra-source-files:
README.md,
2021-06-30 22:33:00 +00:00
ChangeLog.md
extra-source-files:
imgui/*.h,
imgui/backends/*.h,
imgui/backends/*.mm,
imgui/imconfig.h,
imgui/LICENSE.txt
2021-01-24 15:27:03 +00:00
2022-02-13 16:05:49 +00:00
common exe-flags
2021-09-21 12:14:37 +00:00
if flag(debug)
if os(linux)
2021-10-04 18:41:07 +00:00
ghc-options: -Wall -g -rtsopts -dcore-lint -debug
2021-09-21 12:14:37 +00:00
cc-options: -g -O0 -fsanitize=address -fno-omit-frame-pointer
cxx-options: -g -O0 -fsanitize=address -fno-omit-frame-pointer -std=c++11
if os(darwin)
2021-10-04 18:41:07 +00:00
ghc-options: -Wall -g -rtsopts -dcore-lint -debug
2021-09-21 12:14:37 +00:00
cc-options: -g -O0 -fsanitize=address -fno-omit-frame-pointer
cxx-options: -g -O0 -fsanitize=address -fno-omit-frame-pointer -std=c++11
if os(windows)
2021-10-04 18:41:07 +00:00
ghc-options: -Wall -g -rtsopts -dcore-lint -debug
2021-09-21 12:14:37 +00:00
cc-options: -g -O0
cxx-options: -g -O0 -std=c++11
else
if os(linux)
ghc-options: -Wall -O2
cc-options: -O2
cxx-options: -std=c++11 -O2
if os(darwin)
ghc-options: -Wall -O2
cc-options: -O2
if os(windows)
ghc-options: -Wall -O2
cc-options: -O2
2021-06-30 21:47:23 +00:00
source-repository head
type: git
location: https://github.com/haskell-game/dear-imgui.hs
2021-09-21 12:14:37 +00:00
flag debug
description:
Enable debug mode.
default:
False
manual:
True
2021-02-06 14:44:58 +00:00
flag opengl2
2021-01-24 18:25:40 +00:00
description:
2021-02-06 14:44:58 +00:00
Enable OpenGL 2 backend.
default:
False
manual:
2021-06-20 17:24:22 +00:00
True
2021-02-06 14:44:58 +00:00
flag opengl3
description:
Enable OpenGL 3 backend.
2021-01-24 18:25:40 +00:00
default:
True
manual:
2021-06-20 17:24:22 +00:00
True
2021-01-24 18:25:40 +00:00
2021-01-26 20:45:21 +00:00
flag vulkan
description:
Enable Vulkan backend.
default:
False
manual:
True
2021-01-24 18:25:40 +00:00
flag sdl
description:
Enable SDL backend.
default:
True
manual:
2021-06-20 17:24:22 +00:00
True
2021-01-24 18:25:40 +00:00
2023-12-15 13:31:04 +00:00
flag sdl-renderer
description:
Enable SDL Renderer backend (requires the SDL_RenderGeometry function available in SDL 2.0.18+).
The sdl configuration flag must also be enabled when using this flag.
default:
False
manual:
True
2021-02-05 21:44:52 +00:00
flag glfw
description:
Enable GLFW backend.
default:
False
manual:
True
2021-03-11 22:59:57 +00:00
flag examples
description:
Build executable examples.
default:
False
manual:
True
2022-02-13 16:05:49 +00:00
flag disable-obsolete
description:
Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
default:
False
manual:
True
flag use-wchar32
description:
Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
default:
True
manual:
True
2022-07-23 12:42:13 +00:00
flag use-ImDrawIdx32
description:
Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices.
Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer.
Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
default:
True
manual:
True
2021-02-05 20:57:17 +00:00
common common
build-depends:
base
2023-07-02 21:54:03 +00:00
>= 4.12 && < 4.19
2021-02-05 20:57:17 +00:00
default-language:
Haskell2010
2021-01-24 15:27:03 +00:00
library
2021-10-04 18:41:07 +00:00
import: common
2021-02-05 20:57:17 +00:00
hs-source-dirs:
src
2021-01-24 18:25:40 +00:00
exposed-modules:
DearImGui
2021-12-22 10:28:46 +00:00
DearImGui.FontAtlas
2022-05-15 19:41:10 +00:00
DearImGui.Internal.Text
2021-04-05 17:16:09 +00:00
DearImGui.Raw
2021-09-15 05:52:00 +00:00
DearImGui.Raw.DrawList
2021-12-22 10:28:46 +00:00
DearImGui.Raw.Font
DearImGui.Raw.Font.Config
DearImGui.Raw.Font.GlyphRanges
2021-10-04 17:29:32 +00:00
DearImGui.Raw.IO
2022-05-15 19:41:10 +00:00
DearImGui.Raw.ListClipper
2023-01-15 13:27:15 +00:00
DearImGui.Raw.Context
2021-02-05 20:57:17 +00:00
other-modules:
DearImGui.Enums
DearImGui.Structs
2021-10-04 18:41:07 +00:00
cxx-options: -std=c++11
2021-01-24 15:27:03 +00:00
cxx-sources:
imgui/imgui.cpp
2021-01-24 18:25:40 +00:00
imgui/imgui_demo.cpp
imgui/imgui_draw.cpp
2021-01-24 15:27:03 +00:00
imgui/imgui_tables.cpp
imgui/imgui_widgets.cpp
2022-07-19 21:33:57 +00:00
install-includes:
imgui.h
imgui_internal.h
imstb_rectpack.h
imstb_textedit.h
imstb_truetype.h
2024-02-23 12:43:53 +00:00
if impl(ghc >= 9.4)
build-depends: system-cxx-std-lib
else
extra-libraries: stdc++
2022-07-19 21:33:57 +00:00
extra-bundled-libraries:
HSdear-imgui-2.0.0-inplace
2021-01-24 18:25:40 +00:00
include-dirs:
imgui
build-depends:
2021-02-05 20:57:17 +00:00
dear-imgui-generator
2021-01-24 20:46:01 +00:00
, containers
2021-01-28 23:38:59 +00:00
, managed
2021-01-24 18:25:40 +00:00
, inline-c
, inline-c-cpp
, StateVar
2021-04-18 10:10:20 +00:00
, unliftio
2021-09-17 08:09:22 +00:00
, vector
2022-05-15 19:41:10 +00:00
, text
2021-01-24 18:25:40 +00:00
2022-08-30 18:57:08 +00:00
if os(darwin)
ghc-options:
-optcxx-std=c++11
2022-02-13 16:05:49 +00:00
if flag(disable-obsolete)
cxx-options: -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS
if flag(use-wchar32)
cxx-options: -DIMGUI_USE_WCHAR32
cpp-options: -DIMGUI_USE_WCHAR32
2022-07-23 12:42:13 +00:00
if flag(use-ImDrawIdx32)
cxx-options: "-DImDrawIdx=unsigned int"
cpp-options: "-DImDrawIdx=unsigned int"
2021-02-06 14:44:58 +00:00
if flag(opengl2)
2021-01-24 18:25:40 +00:00
exposed-modules:
2021-02-06 14:44:58 +00:00
DearImGui.OpenGL2
2021-01-24 18:25:40 +00:00
cxx-sources:
imgui/backends/imgui_impl_opengl2.cpp
2021-02-06 14:44:58 +00:00
build-depends:
gl
if flag(opengl3)
exposed-modules:
DearImGui.OpenGL3
cxx-sources:
imgui/backends/imgui_impl_opengl3.cpp
2021-02-06 21:19:56 +00:00
pkgconfig-depends:
glew
2021-01-24 18:25:40 +00:00
2021-01-26 20:45:21 +00:00
if flag(vulkan)
exposed-modules:
DearImGui.Vulkan
other-modules:
DearImGui.Vulkan.Types
build-depends:
vulkan
, unliftio
cxx-sources:
imgui/backends/imgui_impl_vulkan.cpp
if os(windows)
extra-libraries:
vulkan-1
else
if os(darwin)
extra-libraries:
vulkan
else
pkgconfig-depends:
vulkan
2021-01-24 18:25:40 +00:00
if flag(sdl)
exposed-modules:
DearImGui.SDL
build-depends:
sdl2
cxx-sources:
2023-07-17 16:13:23 +00:00
imgui/backends/imgui_impl_sdl2.cpp
2021-01-24 18:25:40 +00:00
if os(windows) || os(darwin)
extra-libraries:
2021-01-25 16:42:31 +00:00
SDL2
2021-01-24 18:25:40 +00:00
else
pkgconfig-depends:
sdl2
2021-02-06 14:44:58 +00:00
if flag(opengl2) || flag(opengl3)
2021-01-24 18:25:40 +00:00
exposed-modules:
DearImGui.SDL.OpenGL
2021-01-24 15:27:03 +00:00
2021-01-26 20:45:21 +00:00
if flag(vulkan)
exposed-modules:
DearImGui.SDL.Vulkan
2023-12-15 13:31:04 +00:00
if flag(sdl-renderer)
exposed-modules:
DearImGui.SDL.Renderer
cxx-sources:
imgui/backends/imgui_impl_sdlrenderer2.cpp
2021-02-05 21:44:52 +00:00
if flag(glfw)
exposed-modules:
DearImGui.GLFW
build-depends:
2021-09-01 16:22:55 +00:00
GLFW-b,
bindings-GLFW
2021-02-05 21:44:52 +00:00
cxx-sources:
imgui/backends/imgui_impl_glfw.cpp
if os(linux) || os(darwin)
pkgconfig-depends:
glfw3
2021-02-06 14:44:58 +00:00
if flag(opengl2) || flag(opengl3)
2021-02-05 21:44:52 +00:00
exposed-modules:
DearImGui.GLFW.OpenGL
if flag(vulkan)
exposed-modules:
DearImGui.GLFW.Vulkan
2021-02-05 20:57:17 +00:00
library dear-imgui-generator
2021-10-04 18:41:07 +00:00
import: common
2021-02-05 20:57:17 +00:00
hs-source-dirs: generator
exposed-modules:
DearImGui.Generator
, DearImGui.Generator.Parser
, DearImGui.Generator.Tokeniser
, DearImGui.Generator.Types
build-depends:
template-haskell
2023-05-07 14:44:13 +00:00
>= 2.15 && < 2.21
2021-02-07 23:07:14 +00:00
, containers
^>= 0.6.2.1
2021-02-05 20:57:17 +00:00
, directory
>= 1.3 && < 1.4
, filepath
>= 1.4 && < 1.5
2021-02-07 23:07:14 +00:00
, inline-c
>= 0.9.0.0 && < 0.10
2021-02-05 20:57:17 +00:00
, megaparsec
2023-09-10 18:55:24 +00:00
>= 9.0 && < 9.4
2021-02-05 20:57:17 +00:00
, parser-combinators
2021-09-08 12:10:39 +00:00
>= 1.2.0 && < 1.4
2021-02-05 20:57:17 +00:00
, scientific
2021-06-15 21:52:39 +00:00
>= 0.3.6.2 && < 0.3.8
2021-02-05 20:57:17 +00:00
, text
2022-05-15 19:41:10 +00:00
>= 1.2.4 && < 2.1
2021-02-05 20:57:17 +00:00
, th-lift
>= 0.7 && < 0.9
, transformers
2023-05-07 14:44:13 +00:00
>= 0.5.6 && < 0.7
2021-02-05 20:57:17 +00:00
, unordered-containers
2021-12-19 15:25:11 +00:00
>= 0.2.11 && < 0.3
2021-01-24 15:27:03 +00:00
executable test
2022-02-13 16:05:49 +00:00
import: common, exe-flags
2021-01-24 15:27:03 +00:00
main-is: Main.hs
2021-02-05 21:44:52 +00:00
default-language: Haskell2010
2021-03-11 22:59:57 +00:00
if (!flag(examples) || !flag(sdl) || !flag(opengl2))
buildable: False
2021-03-12 15:39:24 +00:00
else
2021-09-17 08:09:22 +00:00
build-depends: base, sdl2, gl, dear-imgui, vector
2021-02-05 21:44:52 +00:00
executable glfw
2022-02-13 16:05:49 +00:00
import: common, exe-flags
2021-02-05 21:44:52 +00:00
main-is: Main.hs
hs-source-dirs: examples/glfw
default-language: Haskell2010
2022-11-22 19:13:18 +00:00
if (!flag(examples) || !flag(glfw) || !flag(opengl2))
2021-03-11 22:59:57 +00:00
buildable: False
2021-03-12 15:39:24 +00:00
else
2022-05-15 19:41:10 +00:00
build-depends: base, GLFW-b, gl, dear-imgui, managed, text
2021-01-24 19:50:21 +00:00
executable readme
2022-02-13 16:05:49 +00:00
import: common, exe-flags
2021-01-24 19:50:21 +00:00
main-is: Readme.hs
hs-source-dirs: examples
2021-02-05 20:57:17 +00:00
build-depends: sdl2, gl, dear-imgui, managed
2021-03-11 22:59:57 +00:00
if (!flag(examples) || !flag(sdl) || !flag(opengl2))
buildable: False
2021-01-26 20:45:21 +00:00
2021-12-22 10:28:46 +00:00
executable fonts
2022-02-13 16:05:49 +00:00
import: common, exe-flags
2021-12-22 10:28:46 +00:00
main-is: Main.hs
hs-source-dirs: examples/fonts
build-depends: sdl2, gl, dear-imgui, managed
if (!flag(examples) || !flag(sdl) || !flag(opengl2))
buildable: False
2021-09-12 10:35:03 +00:00
executable image
2022-02-13 16:05:49 +00:00
import: common, exe-flags
2021-09-12 10:35:03 +00:00
main-is: Image.hs
hs-source-dirs: examples/sdl
2021-09-12 11:56:43 +00:00
build-depends: sdl2, gl, dear-imgui, managed, vector
2022-12-24 10:21:51 +00:00
if (!flag(examples) || !flag(sdl) || !flag(opengl3))
2021-09-12 10:35:03 +00:00
buildable: False
2023-12-15 13:31:04 +00:00
executable sdlrenderer
import: common, exe-flags
main-is: Renderer.hs
hs-source-dirs: examples/sdl
build-depends: sdl2, dear-imgui, managed, text
if (!flag(examples) || !flag(sdl) || !flag(sdl-renderer))
buildable: False
2021-01-26 20:45:21 +00:00
executable vulkan
2022-02-13 16:05:49 +00:00
import: common, exe-flags
2021-01-26 20:45:21 +00:00
main-is: Main.hs
other-modules: Attachments, Backend, Input, Util
hs-source-dirs: examples/vulkan
default-language: Haskell2010
2021-03-11 22:59:57 +00:00
if (!flag(examples) || !flag(sdl) || !flag(vulkan))
buildable: False
2021-03-12 15:39:24 +00:00
else
build-depends:
dear-imgui
, bytestring
2023-09-10 13:24:33 +00:00
>= 0.10.10.0 && < 0.13
2021-03-12 15:39:24 +00:00
, containers
2023-09-10 13:24:33 +00:00
>= 0.6.2.1 && < 0.7
2021-03-12 15:39:24 +00:00
, logging-effect
2023-09-10 13:24:33 +00:00
>= 1.3.12 && < 1.5
2021-03-12 15:39:24 +00:00
, resourcet
2023-09-10 13:24:33 +00:00
>= 1.2.4.2 && < 1.3
2021-03-12 15:39:24 +00:00
, sdl2
2023-09-10 13:24:33 +00:00
>= 2.5.3.0 && < 2.6
, text
>= 1.2.4 && < 2.1
2021-03-12 15:39:24 +00:00
, transformers
2023-05-07 14:44:13 +00:00
>= 0.5.6 && < 0.7
2021-03-12 15:39:24 +00:00
, unliftio
2023-09-10 13:24:33 +00:00
>= 0.2.13 && < 0.3
2021-03-12 15:39:24 +00:00
, unliftio-core
2023-09-10 13:24:33 +00:00
>= 0.2.0.1 && < 0.3
2021-03-12 15:39:24 +00:00
, vector
2023-09-10 13:24:33 +00:00
>= 0.12.1.2 && < 0.14
2021-03-12 15:39:24 +00:00
, vulkan
2022-12-12 18:33:48 +00:00
>= 3.12
2021-03-12 15:39:24 +00:00
, vulkan-utils
2022-12-12 18:33:48 +00:00
>= 0.5
2022-02-13 14:24:08 +00:00
, VulkanMemoryAllocator
2022-12-12 18:33:48 +00:00
>= 0.7.1
2022-02-13 14:24:08 +00:00
, JuicyPixels