Skip to content

Commit b3d2af5

Browse files
committed
Move XDG stuff from deps/build.jl to deps/ext_glib.jl
1 parent 910903a commit b3d2af5

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

deps/build.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ end
2727
@osx_only begin
2828
using Homebrew
2929
provides(Homebrew.HB, "gtk+3", gtk, os = :Darwin)
30-
31-
# Append to XDG_DATA_DIRS to get us the proper paths setup for glib schemas
32-
if "XDG_DATA_DIRS" in ENV
33-
ENV["XDG_DATA_DIRS"] *= ":" * joinpath(Homebrew.brew_prefix, "share")
34-
else
35-
ENV["XDG_DATA_DIRS"] = joinpath(Homebrew.brew_prefix, "share")
36-
end
3730
end
3831

3932
if OS_NAME == :Windows

deps/ext_glib.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,17 @@ else
1111
const libglib = "libglib-2.0"
1212
end
1313
end
14+
15+
@osx_only begin
16+
if Pkg.installed("Homebrew") != nothing
17+
using Homebrew
18+
if Homebrew.installed("gtk+3")
19+
# Append to XDG_DATA_DIRS to get us the proper paths setup for glib schemas
20+
if "XDG_DATA_DIRS" in ENV
21+
ENV["XDG_DATA_DIRS"] *= ":" * joinpath(Homebrew.brew_prefix, "share")
22+
else
23+
ENV["XDG_DATA_DIRS"] = joinpath(Homebrew.brew_prefix, "share")
24+
end
25+
end
26+
end
27+
end

0 commit comments

Comments
 (0)