Skip to content

Commit d84f33e

Browse files
author
Timo von Holtz
committed
Add custom Setup.hs
Set linker and compiler to g++
1 parent e2e2e19 commit d84f33e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

Setup.hs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
import Distribution.Simple
2-
main = defaultMain
2+
import System.Environment
3+
import System.IO
4+
5+
main =
6+
do args <- getArgs
7+
let args' = if "configure" `elem` args then args ++ ["--with-gcc","g++","--with-ld","g++"] else args
8+
defaultMainArgs args'

examples/opencv-examples.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ homepage: lumiguide.eu
44
license: BSD3
55
author: Roel van Dijk <roel@lambdacube.nl>, Bas van Dijk <v.dijk.bas@gmail.com>
66
maintainer: Roel van Dijk <roel@lambdacube.nl>, Bas van Dijk <v.dijk.bas@gmail.com>
7-
build-type: Simple
7+
build-type: Custom
88
cabal-version: >=1.10
99

1010
extra-source-files:
@@ -20,4 +20,4 @@ executable highgui
2020
, bytestring
2121
, opencv
2222

23-
default-language: Haskell2010
23+
default-language: Haskell2010

opencv.cabal

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license: BSD3
55
license-file: LICENSE
66
author: Roel van Dijk <roel@lambdacube.nl>, Bas van Dijk <v.dijk.bas@gmail.com>
77
maintainer: Roel van Dijk <roel@lambdacube.nl>, Bas van Dijk <v.dijk.bas@gmail.com>
8-
build-type: Simple
8+
build-type: Custom
99
cabal-version: >=1.10
1010

1111
extra-source-files:
@@ -122,6 +122,7 @@ library
122122

123123
default-language: Haskell2010
124124
pkgconfig-depends: opencv
125+
extra-libraries: stdc++
125126

126127
test-suite opencv-doc-images
127128
type: exitcode-stdio-1.0

0 commit comments

Comments
 (0)