mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2024-11-22 16:57:00 +00:00
Added compiler flags stanzas. (#105)
This commit is contained in:
parent
4ecf62ac9e
commit
8db9ddec2f
@ -24,10 +24,45 @@ extra-source-files:
|
|||||||
imgui/imconfig.h,
|
imgui/imconfig.h,
|
||||||
imgui/LICENSE.txt
|
imgui/LICENSE.txt
|
||||||
|
|
||||||
|
common build-flags
|
||||||
|
if flag(debug)
|
||||||
|
if os(linux)
|
||||||
|
ghc-options: -Wall -g -rtsopts -dcore-lint -debug -O0
|
||||||
|
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)
|
||||||
|
ghc-options: -Wall -g -rtsopts -dcore-lint -debug -O0
|
||||||
|
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)
|
||||||
|
ghc-options: -Wall -g -rtsopts -dcore-lint -debug -O0
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
source-repository head
|
source-repository head
|
||||||
type: git
|
type: git
|
||||||
location: https://github.com/haskell-game/dear-imgui.hs
|
location: https://github.com/haskell-game/dear-imgui.hs
|
||||||
|
|
||||||
|
flag debug
|
||||||
|
description:
|
||||||
|
Enable debug mode.
|
||||||
|
default:
|
||||||
|
False
|
||||||
|
manual:
|
||||||
|
True
|
||||||
|
|
||||||
flag opengl2
|
flag opengl2
|
||||||
description:
|
description:
|
||||||
Enable OpenGL 2 backend.
|
Enable OpenGL 2 backend.
|
||||||
@ -82,11 +117,9 @@ common common
|
|||||||
>= 4.12 && < 4.17
|
>= 4.12 && < 4.17
|
||||||
default-language:
|
default-language:
|
||||||
Haskell2010
|
Haskell2010
|
||||||
ghc-options:
|
|
||||||
-Wall
|
|
||||||
|
|
||||||
library
|
library
|
||||||
import: common
|
import: common, build-flags
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
src
|
src
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
@ -104,8 +137,6 @@ library
|
|||||||
imgui/imgui_draw.cpp
|
imgui/imgui_draw.cpp
|
||||||
imgui/imgui_tables.cpp
|
imgui/imgui_tables.cpp
|
||||||
imgui/imgui_widgets.cpp
|
imgui/imgui_widgets.cpp
|
||||||
cxx-options:
|
|
||||||
-std=c++11
|
|
||||||
extra-libraries:
|
extra-libraries:
|
||||||
stdc++
|
stdc++
|
||||||
include-dirs:
|
include-dirs:
|
||||||
@ -202,7 +233,7 @@ library
|
|||||||
DearImGui.GLFW.Vulkan
|
DearImGui.GLFW.Vulkan
|
||||||
|
|
||||||
library dear-imgui-generator
|
library dear-imgui-generator
|
||||||
import: common
|
import: common, build-flags
|
||||||
hs-source-dirs: generator
|
hs-source-dirs: generator
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
DearImGui.Generator
|
DearImGui.Generator
|
||||||
@ -236,27 +267,26 @@ library dear-imgui-generator
|
|||||||
>= 0.2.11 && < 0.2.15
|
>= 0.2.11 && < 0.2.15
|
||||||
|
|
||||||
executable test
|
executable test
|
||||||
import: common
|
import: common, build-flags
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
ghc-options: -Wall
|
|
||||||
if (!flag(examples) || !flag(sdl) || !flag(opengl2))
|
if (!flag(examples) || !flag(sdl) || !flag(opengl2))
|
||||||
buildable: False
|
buildable: False
|
||||||
else
|
else
|
||||||
build-depends: base, sdl2, gl, dear-imgui, vector
|
build-depends: base, sdl2, gl, dear-imgui, vector
|
||||||
|
|
||||||
executable glfw
|
executable glfw
|
||||||
|
import: common, build-flags
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
hs-source-dirs: examples/glfw
|
hs-source-dirs: examples/glfw
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
ghc-options: -Wall
|
|
||||||
if (!flag(examples) || !flag(glfw) || !flag(opengl2))
|
if (!flag(examples) || !flag(glfw) || !flag(opengl2))
|
||||||
buildable: False
|
buildable: False
|
||||||
else
|
else
|
||||||
build-depends: base, GLFW-b, gl, dear-imgui, managed
|
build-depends: base, GLFW-b, gl, dear-imgui, managed
|
||||||
|
|
||||||
executable readme
|
executable readme
|
||||||
import: common
|
import: common, build-flags
|
||||||
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
|
||||||
@ -264,7 +294,7 @@ executable readme
|
|||||||
buildable: False
|
buildable: False
|
||||||
|
|
||||||
executable image
|
executable image
|
||||||
import: common
|
import: common, build-flags
|
||||||
main-is: Image.hs
|
main-is: Image.hs
|
||||||
hs-source-dirs: examples/sdl
|
hs-source-dirs: examples/sdl
|
||||||
build-depends: sdl2, gl, dear-imgui, managed, vector
|
build-depends: sdl2, gl, dear-imgui, managed, vector
|
||||||
@ -272,12 +302,11 @@ executable image
|
|||||||
buildable: False
|
buildable: False
|
||||||
|
|
||||||
executable vulkan
|
executable vulkan
|
||||||
import: common
|
import: common, build-flags
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
other-modules: Attachments, Backend, Input, Util
|
other-modules: Attachments, Backend, Input, Util
|
||||||
hs-source-dirs: examples/vulkan
|
hs-source-dirs: examples/vulkan
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
ghc-options: -Wall
|
|
||||||
if (!flag(examples) || !flag(sdl) || !flag(vulkan))
|
if (!flag(examples) || !flag(sdl) || !flag(vulkan))
|
||||||
buildable: False
|
buildable: False
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user