diff options
author | Yury Benesh <ybxsoft@tut.by> | 2013-07-09 21:58:22 +0300 |
---|---|---|
committer | Yury Benesh <ybxsoft@tut.by> | 2013-07-09 21:58:22 +0300 |
commit | 3c9864c9d3092455755b44db2f06616ac75515b6 (patch) | |
tree | 105a3bd53dd255ccb23680291e79e81be1fad2e5 /lib/wrappers | |
parent | f74e296f8486fd55d97a7a89e345a783a855e19c (diff) | |
download | Nim-3c9864c9d3092455755b44db2f06616ac75515b6.tar.gz |
Added use_pkg_config, use_pkg_config_static conditionals to xlib, cairo
Diffstat (limited to 'lib/wrappers')
-rw-r--r-- | lib/wrappers/cairo/cairo.nim | 7 | ||||
-rw-r--r-- | lib/wrappers/cairo/cairoxlib.nim | 3 | ||||
-rw-r--r-- | lib/wrappers/x11/xlib.nim | 10 |
3 files changed, 13 insertions, 7 deletions
diff --git a/lib/wrappers/cairo/cairo.nim b/lib/wrappers/cairo/cairo.nim index 2508d8d07..51027fa51 100644 --- a/lib/wrappers/cairo/cairo.nim +++ b/lib/wrappers/cairo/cairo.nim @@ -47,9 +47,12 @@ # By Luiz Américo Pereira Câmara # October 2007 # -when defined(pkclibcairo): - {.passl: gorge("pkg-config cairo --libs").} +when defined(use_pkg_config) or defined(use_pkg_config_static): {.pragma: libcairo, cdecl.} + when defined(use_pkg_config_static): + {.passl: gorge("pkg-config cairo --libs --static").} + else: + {.passl: gorge("pkg-config cairo --libs").} else: when defined(windows): const LIB_CAIRO* = "libcairo-2.dll" diff --git a/lib/wrappers/cairo/cairoxlib.nim b/lib/wrappers/cairo/cairoxlib.nim index 028f2d722..edadb8175 100644 --- a/lib/wrappers/cairo/cairoxlib.nim +++ b/lib/wrappers/cairo/cairoxlib.nim @@ -7,8 +7,7 @@ import cairo, x, xlib, xrender -when defined(pkclibcairo): - {.passl: gorge("pkg-config cairo --libs").} +when defined(use_pkg_config) or defined(use_pkg_config_static): {.pragma: libcairo, cdecl.} else: when defined(windows): diff --git a/lib/wrappers/x11/xlib.nim b/lib/wrappers/x11/xlib.nim index 1f7059771..38e96f2b1 100644 --- a/lib/wrappers/x11/xlib.nim +++ b/lib/wrappers/x11/xlib.nim @@ -2,9 +2,12 @@ import x -when defined(pkclibx): +when defined(use_pkg_config) or defined(use_pkg_config_static): {.pragma: libx11, cdecl, importc.} - {.passl: gorge("pkg-config x11 --libs").} + when defined(use_pkg_config_static): + {.passl: gorge("pkg-config x11 --static --libs").} + else: + {.passl: gorge("pkg-config x11 --libs").} else: when defined(macosx): const @@ -694,7 +697,8 @@ type window*: TWindow message_type*: TAtom format*: cint - data*: array[0..4, clong] + data*: array[0..4, clong] # using clong here to be 32/64-bit dependent + # as the original C union PXMappingEvent* = ptr TXMappingEvent TXMappingEvent*{.final.} = object |