Skip to content

Instantly share code, notes, and snippets.

View jodonoghue's full-sized avatar

Jeremy O'Donoghue jodonoghue

View GitHub Profile
@jodonoghue
jodonoghue / Setup.hs
Created October 20, 2011 13:15
Building a C/C++ library from Cabal
--
-- Modified version of the wxcore Cabal setup.hs file which builds the C++ code in a buildhook
-- so that we have some control over how the linking works.
--
import Control.Monad (when)
import Data.List (foldl', intercalate, nub, lookup)
import Data.Maybe (fromJust)
import Distribution.PackageDescription
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo, localPkgDescr, withPrograms, buildDir)