From dbf8d42721eae75db0426f3504b823d0355423a6 Mon Sep 17 00:00:00 2001 From: Jason Shipman Date: Wed, 21 Feb 2024 11:14:12 -0500 Subject: [PATCH 1/2] Link against system-cxx-std-lib for GHC 9.4+ --- dear-imgui.cabal | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dear-imgui.cabal b/dear-imgui.cabal index a445b03..0809197 100644 --- a/dear-imgui.cabal +++ b/dear-imgui.cabal @@ -179,8 +179,15 @@ library imgui/imgui_draw.cpp imgui/imgui_tables.cpp imgui/imgui_widgets.cpp - extra-libraries: - stdc++ + if impl(ghc >= 9.4) + build-depends: system-cxx-std-lib + else + if os(linux) + extra-libraries: stdc++ + if os(darwin) + extra-libraries: stdc++ + if os(windows) + extra-libraries: stdc++ include-dirs: imgui build-depends: From ae1ef9fe76bd26998831c8ffd20f18d29a4750c0 Mon Sep 17 00:00:00 2001 From: Jason Shipman Date: Wed, 21 Feb 2024 13:46:57 -0500 Subject: [PATCH 2/2] Drop OS checks for linking with stdc++ when GHC < 9.4 --- dear-imgui.cabal | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dear-imgui.cabal b/dear-imgui.cabal index 0809197..def7e17 100644 --- a/dear-imgui.cabal +++ b/dear-imgui.cabal @@ -182,12 +182,7 @@ library if impl(ghc >= 9.4) build-depends: system-cxx-std-lib else - if os(linux) - extra-libraries: stdc++ - if os(darwin) - extra-libraries: stdc++ - if os(windows) - extra-libraries: stdc++ + extra-libraries: stdc++ include-dirs: imgui build-depends: