From 5fc9b9dd9b20b1bae8b0690bbe4ca8e84fb66a42 Mon Sep 17 00:00:00 2001 From: Angel Ezquerra Date: Thu, 15 Feb 2024 19:57:04 +0100 Subject: [PATCH] Look for cairo.dll on Windows if libcairo-2.dll is not found While typically the cairo dll is called `libcairo-2.dll`, there are some builds which call it `cairo.dll` (see for example https://github.com/preshing/cairo-windows). This causes problems for libraries like ggplotnim, which cannot just recommend users to download the stand-alone cairo library from the URL above because its dll is not called libcairo-2.dll. --- src/cairo_pragma.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairo_pragma.nim b/src/cairo_pragma.nim index bcca150..b4f84f5 100644 --- a/src/cairo_pragma.nim +++ b/src/cairo_pragma.nim @@ -8,7 +8,7 @@ when declared(use_pkg_config) or declared(use_pkg_config_static): {.passl: gorge("pkg-config cairo --libs").} else: when defined(windows): - const LibCairo* = "libcairo-2.dll" + const LibCairo* = "(libcairo-2|cairo).dll" elif defined(macosx): const LibCairo* = "libcairo(|.2).dylib" else: