Skip to content

Commit

Permalink
temp: Check if preBuild is called for sdl
Browse files Browse the repository at this point in the history
  • Loading branch information
yutotakano committed Aug 10, 2024
1 parent c3eaa0f commit 92df3f7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 92df3f7

Please sign in to comment.