Added use_pkg_config, use_pkg_config_static conditionals to xlib, cairo

This commit is contained in:
Yury Benesh 2013-07-09 21:58:22 +03:00
commit 3c9864c9d3
3 changed files with 13 additions and 7 deletions

View file

@ -47,9 +47,12 @@
# By Luiz Américo Pereira Câmara # By Luiz Américo Pereira Câmara
# October 2007 # October 2007
# #
when defined(pkclibcairo): when defined(use_pkg_config) or defined(use_pkg_config_static):
{.passl: gorge("pkg-config cairo --libs").}
{.pragma: libcairo, cdecl.} {.pragma: libcairo, cdecl.}
when defined(use_pkg_config_static):
{.passl: gorge("pkg-config cairo --libs --static").}
else:
{.passl: gorge("pkg-config cairo --libs").}
else: else:
when defined(windows): when defined(windows):
const LIB_CAIRO* = "libcairo-2.dll" const LIB_CAIRO* = "libcairo-2.dll"

View file

@ -7,8 +7,7 @@
import import
cairo, x, xlib, xrender cairo, x, xlib, xrender
when defined(pkclibcairo): when defined(use_pkg_config) or defined(use_pkg_config_static):
{.passl: gorge("pkg-config cairo --libs").}
{.pragma: libcairo, cdecl.} {.pragma: libcairo, cdecl.}
else: else:
when defined(windows): when defined(windows):

View file

@ -2,9 +2,12 @@
import import
x x
when defined(pkclibx): when defined(use_pkg_config) or defined(use_pkg_config_static):
{.pragma: libx11, cdecl, importc.} {.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: else:
when defined(macosx): when defined(macosx):
const const
@ -694,7 +697,8 @@ type
window*: TWindow window*: TWindow
message_type*: TAtom message_type*: TAtom
format*: cint 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 PXMappingEvent* = ptr TXMappingEvent
TXMappingEvent*{.final.} = object TXMappingEvent*{.final.} = object