diff --git a/Setup.hs b/Setup.hs index 3459402..06fea91 100644 --- a/Setup.hs +++ b/Setup.hs @@ -34,7 +34,10 @@ import System.Directory main :: IO () main = case buildOS of - Windows -> defaultMainWithHooks simpleUserHooks { confHook = sdlConfHook } + Windows -> defaultMainWithHooks simpleUserHooks + { confHook = sdlConfHook + , preBuild = sdlPreBuild + } _ -> defaultMain -- | A hook that adds the SDL include and lib directories to the build info on @@ -76,3 +79,10 @@ sdlConfHook (description, buildInfo) flags = do } } } + +sdlPreBuild :: Args -> BuildFlags -> IO HookedBuildInfo +sdlPreBuild args flags = do + print args + print flags + putStrLn "\ESC[34mRunning custom SDL pre-build hook\ESC[m" + pure emptyHookedBuildInfo