Skip to content

Commit 0e47d94

Browse files
committed
refactor sharedLib
1 parent 54ffea1 commit 0e47d94

File tree

2 files changed

+35
-57
lines changed

2 files changed

+35
-57
lines changed

Setup.hs

Lines changed: 0 additions & 14 deletions
This file was deleted.

dear-imgui.cabal

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ description:
1313
Set package flags according to your needs.
1414

1515
build-type: Simple
16-
extra-source-files:
17-
README.md,
18-
ChangeLog.md
1916

2017
extra-source-files:
18+
README.md,
19+
ChangeLog.md,
2120
imgui/*.h,
2221
imgui/backends/*.h,
2322
imgui/backends/*.mm,
@@ -148,6 +147,7 @@ library
148147
import: common
149148
hs-source-dirs:
150149
src
150+
generator
151151
exposed-modules:
152152
DearImGui
153153
DearImGui.FontAtlas
@@ -163,6 +163,13 @@ library
163163
DearImGui.Context
164164
DearImGui.Enums
165165
DearImGui.Structs
166+
DearImGui.Generator
167+
DearImGui.Generator.Parser
168+
DearImGui.Generator.Tokeniser
169+
DearImGui.Generator.Types
170+
ghc-options:
171+
-static -dynamic-too
172+
-- create both libHSdear-imgui... .a and .so
166173
cxx-options: -std=c++11
167174
cxx-sources:
168175
imgui/imgui.cpp
@@ -178,20 +185,39 @@ library
178185
imstb_truetype.h
179186
extra-libraries:
180187
stdc++
181-
extra-bundled-libraries:
182-
HSdear-imgui-2.0.0-inplace
183188
include-dirs:
184189
imgui
185190
build-depends:
186-
dear-imgui-generator
187-
, containers
188-
, managed
189-
, inline-c
191+
managed
190192
, inline-c-cpp
191193
, StateVar
192194
, unliftio
193195
, vector
196+
-- for the generator:
197+
, template-haskell
198+
>= 2.15 && < 2.19
199+
, containers
200+
^>= 0.6.2.1
201+
, directory
202+
>= 1.3 && < 1.4
203+
, filepath
204+
>= 1.4 && < 1.5
205+
, inline-c
206+
>= 0.9.0.0 && < 0.10
207+
, megaparsec
208+
>= 9.0 && < 9.3
209+
, parser-combinators
210+
>= 1.2.0 && < 1.4
211+
, scientific
212+
>= 0.3.6.2 && < 0.3.8
194213
, text
214+
>= 1.2.4 && < 2.1
215+
, th-lift
216+
>= 0.7 && < 0.9
217+
, transformers
218+
>= 0.5.6 && < 0.6
219+
, unordered-containers
220+
>= 0.2.11 && < 0.3
195221

196222
if flag(disable-obsolete)
197223
cxx-options: -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS
@@ -285,40 +311,6 @@ library
285311
exposed-modules:
286312
DearImGui.GLFW.Vulkan
287313

288-
library dear-imgui-generator
289-
import: common
290-
hs-source-dirs: generator
291-
exposed-modules:
292-
DearImGui.Generator
293-
, DearImGui.Generator.Parser
294-
, DearImGui.Generator.Tokeniser
295-
, DearImGui.Generator.Types
296-
build-depends:
297-
template-haskell
298-
>= 2.15 && < 2.19
299-
, containers
300-
^>= 0.6.2.1
301-
, directory
302-
>= 1.3 && < 1.4
303-
, filepath
304-
>= 1.4 && < 1.5
305-
, inline-c
306-
>= 0.9.0.0 && < 0.10
307-
, megaparsec
308-
>= 9.0 && < 9.3
309-
, parser-combinators
310-
>= 1.2.0 && < 1.4
311-
, scientific
312-
>= 0.3.6.2 && < 0.3.8
313-
, text
314-
>= 1.2.4 && < 2.1
315-
, th-lift
316-
>= 0.7 && < 0.9
317-
, transformers
318-
>= 0.5.6 && < 0.6
319-
, unordered-containers
320-
>= 0.2.11 && < 0.3
321-
322314
executable test
323315
import: common, exe-flags
324316
main-is: Main.hs

0 commit comments

Comments
 (0)