From abfbbcf591048bbb3c885cc3f3d0bf3a80771706 Mon Sep 17 00:00:00 2001 From: serenity4 Date: Sun, 18 Aug 2024 11:59:24 +0200 Subject: [PATCH] Allow library to be used on Windows systems --- Project.toml | 2 +- src/LibXCB.jl | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 1c800e2..4853a8e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "XCB" uuid = "16167f82-ea26-5cba-b1de-ed6fd5e30a10" -version = "0.7.1" +version = "0.7.2" [deps] BitMasks = "a3e06817-fd65-4797-8291-16f435bc2529" diff --git a/src/LibXCB.jl b/src/LibXCB.jl index c0e30fa..3433f9b 100644 --- a/src/LibXCB.jl +++ b/src/LibXCB.jl @@ -1,8 +1,11 @@ module LibXCB using BitMasks: @bitmask -using Xorg_libxcb_jll: libxcb, libxcb_xkb -using Xorg_xcb_util_jll: libxcb_util +import Xorg_libxcb_jll: Xorg_libxcb_jll +@static if Xorg_libxcb_jll.is_available() + using Xorg_libxcb_jll: libxcb, libxcb_xkb + using Xorg_xcb_util_jll: libxcb_util +end const IS_LIBC_MUSL = occursin("musl", Base.BUILD_TRIPLET)