Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions hsqml.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading