diff --git a/Setup.hs b/Setup.hs index da91b68..6690480 100644 --- a/Setup.hs +++ b/Setup.hs @@ -40,12 +40,21 @@ main = do case lookup "QT_SELECT" env of Nothing -> setEnv "QT_SELECT" "5" _ -> return () + -- Add extra paths + case os of + "darwin" -> appendPath "/opt/homebrew/opt/qt@5/bin" + _ -> pure () -- Chain standard setup defaultMainWithHooks simpleUserHooks { confHook = confWithQt, buildHook = buildWithQt, copyHook = copyWithQt, instHook = instWithQt, regHook = regWithQt} +appendPath :: FilePath -> IO () +appendPath p = do + paths <- getEnv "PATH" + setEnv "PATH" $ paths <> ":" <> p + getCustomStr :: String -> PackageDescription -> String getCustomStr name pkgDesc = fromMaybe "" $ do diff --git a/hsqml.cabal b/hsqml.cabal index 853f9dc..71eb20f 100644 --- a/hsqml.cabal +++ b/hsqml.cabal @@ -184,8 +184,5 @@ Test-Suite hsqml-test1 Graphics.QML.Test.SignalTest Graphics.QML.Test.SimpleTest Graphics.QML.Test.TestObject - if os(darwin) && !flag(UsePkgConfig) - -- Library not registered yet - GHC-options: -hide-option-framework-path /QT_ROOT/lib if flag(ThreadedTestSuite) GHC-options: -threaded