40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
|
From 761c3328275b03a6530532900973f7faf1363ae2 Mon Sep 17 00:00:00 2001
|
||
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||
|
Date: Fri, 29 Sep 2017 20:08:24 -0400
|
||
|
Subject: [PATCH] Link against sqlite using pkgconfig by default.
|
||
|
|
||
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||
|
---
|
||
|
persistent-sqlite/persistent-sqlite.cabal | 8 +++++++-
|
||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/persistent-sqlite/persistent-sqlite.cabal b/persistent-sqlite/persistent-sqlite.cabal
|
||
|
index aa57976f..7e0753e6 100644
|
||
|
--- a/persistent-sqlite/persistent-sqlite.cabal
|
||
|
+++ b/persistent-sqlite/persistent-sqlite.cabal
|
||
|
@@ -17,6 +17,9 @@ extra-source-files: ChangeLog.md cbits/*.c cbits/*.h
|
||
|
flag systemlib
|
||
|
description: Use the system-wide sqlite library
|
||
|
default: False
|
||
|
+flag no-pkgconfig
|
||
|
+ description: Don't use pkg-config to find system sqlite library
|
||
|
+ default: False
|
||
|
flag build-sanity-exe
|
||
|
description: Build a sanity check test executable
|
||
|
default: False
|
||
|
@@ -42,7 +45,10 @@ library
|
||
|
Database.Persist.Sqlite
|
||
|
ghc-options: -Wall
|
||
|
if flag(systemlib)
|
||
|
- extra-libraries: sqlite3
|
||
|
+ if flag(no-pkgconfig)
|
||
|
+ extra-libraries: sqlite3
|
||
|
+ else
|
||
|
+ pkgconfig-depends: sqlite3
|
||
|
else
|
||
|
c-sources: cbits/sqlite3.c
|
||
|
include-dirs: cbits
|
||
|
--
|
||
|
2.13.5
|
||
|
|