From 3b37a21470e22020d9d1b58acea94a0fbf92252a Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Tue, 19 Jul 2022 23:33:57 +0200 Subject: [PATCH] shared lib --- Setup.hs | 14 ++++++++++++++ dear-imgui.cabal | 8 ++++++++ 2 files changed, 22 insertions(+) create mode 100644 Setup.hs diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..312e7e1 --- /dev/null +++ b/Setup.hs @@ -0,0 +1,14 @@ +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] diff --git a/dear-imgui.cabal b/dear-imgui.cabal index def7e17..1fee808 100644 --- a/dear-imgui.cabal +++ b/dear-imgui.cabal @@ -179,10 +179,18 @@ library imgui/imgui_draw.cpp imgui/imgui_tables.cpp imgui/imgui_widgets.cpp + install-includes: + imgui.h + imgui_internal.h + imstb_rectpack.h + imstb_textedit.h + imstb_truetype.h if impl(ghc >= 9.4) build-depends: system-cxx-std-lib else extra-libraries: stdc++ + extra-bundled-libraries: + HSdear-imgui-2.0.0-inplace include-dirs: imgui build-depends: