mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2024-12-25 05:56:35 +00:00
refactor sharedLib
This commit is contained in:
parent
12c7aafaf6
commit
03205f482e
14
Setup.hs
14
Setup.hs
@ -1,14 +0,0 @@
|
|||||||
import Distribution.Simple
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main = defaultMainWithHooks simpleUserHooks
|
|
||||||
{ postCopy = copyLib
|
|
||||||
}
|
|
||||||
|
|
||||||
copyLib :: :: Args -> CopyFlags -> PackageDescription -> LocalBuildInfo -> IO ()
|
|
||||||
copyExtLib _ flags pkg_descr lbi = do
|
|
||||||
let libPref = libdir . absoluteInstallDirs pkg_descr lbi
|
|
||||||
. fromFlag . copyDest
|
|
||||||
$ flags
|
|
||||||
let verbosity = fromFlag $ copyVerbosity flags
|
|
||||||
rawSystemExit verbosity "cp" ["libHSdear-imgui-2.0.0-inplace-ghc8.10.7.so", libPref]
|
|
@ -13,11 +13,10 @@ description:
|
|||||||
Set package flags according to your needs.
|
Set package flags according to your needs.
|
||||||
|
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
extra-source-files:
|
|
||||||
README.md,
|
|
||||||
ChangeLog.md
|
|
||||||
|
|
||||||
extra-source-files:
|
extra-source-files:
|
||||||
|
README.md,
|
||||||
|
ChangeLog.md,
|
||||||
imgui/*.h,
|
imgui/*.h,
|
||||||
imgui/backends/*.h,
|
imgui/backends/*.h,
|
||||||
imgui/backends/*.mm,
|
imgui/backends/*.mm,
|
||||||
@ -148,6 +147,7 @@ library
|
|||||||
import: common
|
import: common
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
src
|
src
|
||||||
|
generator
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
DearImGui
|
DearImGui
|
||||||
DearImGui.FontAtlas
|
DearImGui.FontAtlas
|
||||||
@ -163,6 +163,13 @@ library
|
|||||||
DearImGui.Context
|
DearImGui.Context
|
||||||
DearImGui.Enums
|
DearImGui.Enums
|
||||||
DearImGui.Structs
|
DearImGui.Structs
|
||||||
|
DearImGui.Generator
|
||||||
|
DearImGui.Generator.Parser
|
||||||
|
DearImGui.Generator.Tokeniser
|
||||||
|
DearImGui.Generator.Types
|
||||||
|
ghc-options:
|
||||||
|
-static -dynamic-too
|
||||||
|
-- create both libHSdear-imgui... .a and .so
|
||||||
cxx-options: -std=c++11
|
cxx-options: -std=c++11
|
||||||
cxx-sources:
|
cxx-sources:
|
||||||
imgui/imgui.cpp
|
imgui/imgui.cpp
|
||||||
@ -178,20 +185,39 @@ library
|
|||||||
imstb_truetype.h
|
imstb_truetype.h
|
||||||
extra-libraries:
|
extra-libraries:
|
||||||
stdc++
|
stdc++
|
||||||
extra-bundled-libraries:
|
|
||||||
HSdear-imgui-2.0.0-inplace
|
|
||||||
include-dirs:
|
include-dirs:
|
||||||
imgui
|
imgui
|
||||||
build-depends:
|
build-depends:
|
||||||
dear-imgui-generator
|
managed
|
||||||
, containers
|
|
||||||
, managed
|
|
||||||
, inline-c
|
|
||||||
, inline-c-cpp
|
, inline-c-cpp
|
||||||
, StateVar
|
, StateVar
|
||||||
, unliftio
|
, unliftio
|
||||||
, vector
|
, vector
|
||||||
|
-- for the generator:
|
||||||
|
, template-haskell
|
||||||
|
>= 2.15 && < 2.19
|
||||||
|
, containers
|
||||||
|
^>= 0.6.2.1
|
||||||
|
, directory
|
||||||
|
>= 1.3 && < 1.4
|
||||||
|
, filepath
|
||||||
|
>= 1.4 && < 1.5
|
||||||
|
, inline-c
|
||||||
|
>= 0.9.0.0 && < 0.10
|
||||||
|
, megaparsec
|
||||||
|
>= 9.0 && < 9.3
|
||||||
|
, parser-combinators
|
||||||
|
>= 1.2.0 && < 1.4
|
||||||
|
, scientific
|
||||||
|
>= 0.3.6.2 && < 0.3.8
|
||||||
, text
|
, text
|
||||||
|
>= 1.2.4 && < 2.1
|
||||||
|
, th-lift
|
||||||
|
>= 0.7 && < 0.9
|
||||||
|
, transformers
|
||||||
|
>= 0.5.6 && < 0.6
|
||||||
|
, unordered-containers
|
||||||
|
>= 0.2.11 && < 0.3
|
||||||
|
|
||||||
if flag(disable-obsolete)
|
if flag(disable-obsolete)
|
||||||
cxx-options: -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
cxx-options: -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||||
@ -285,40 +311,6 @@ library
|
|||||||
exposed-modules:
|
exposed-modules:
|
||||||
DearImGui.GLFW.Vulkan
|
DearImGui.GLFW.Vulkan
|
||||||
|
|
||||||
library dear-imgui-generator
|
|
||||||
import: common
|
|
||||||
hs-source-dirs: generator
|
|
||||||
exposed-modules:
|
|
||||||
DearImGui.Generator
|
|
||||||
, DearImGui.Generator.Parser
|
|
||||||
, DearImGui.Generator.Tokeniser
|
|
||||||
, DearImGui.Generator.Types
|
|
||||||
build-depends:
|
|
||||||
template-haskell
|
|
||||||
>= 2.15 && < 2.19
|
|
||||||
, containers
|
|
||||||
^>= 0.6.2.1
|
|
||||||
, directory
|
|
||||||
>= 1.3 && < 1.4
|
|
||||||
, filepath
|
|
||||||
>= 1.4 && < 1.5
|
|
||||||
, inline-c
|
|
||||||
>= 0.9.0.0 && < 0.10
|
|
||||||
, megaparsec
|
|
||||||
>= 9.0 && < 9.3
|
|
||||||
, parser-combinators
|
|
||||||
>= 1.2.0 && < 1.4
|
|
||||||
, scientific
|
|
||||||
>= 0.3.6.2 && < 0.3.8
|
|
||||||
, text
|
|
||||||
>= 1.2.4 && < 2.1
|
|
||||||
, th-lift
|
|
||||||
>= 0.7 && < 0.9
|
|
||||||
, transformers
|
|
||||||
>= 0.5.6 && < 0.6
|
|
||||||
, unordered-containers
|
|
||||||
>= 0.2.11 && < 0.3
|
|
||||||
|
|
||||||
executable test
|
executable test
|
||||||
import: common, exe-flags
|
import: common, exe-flags
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
|
Loading…
Reference in New Issue
Block a user