Skip to content

Commit ca95aa5

Browse files
Fix glfw build
1 parent ec24d8c commit ca95aa5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/gui/xmake.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ if not has_config("lc_glfw_use_xrepo") then
22
target("glfw")
33
set_basename("luisa-ext-glfw")
44
_config_project({
5-
project_kind = "static"
5+
project_kind = "shared"
66
})
77

88
on_load(function(target)
@@ -20,6 +20,10 @@ if not has_config("lc_glfw_use_xrepo") then
2020
elseif target:is_plat("windows") then
2121
target:add("defines", "_GLFW_WIN32")
2222
target:add("syslinks", "User32", "Gdi32", "Shell32")
23+
target:add('defines', '_GLFW_BUILD_DLL')
24+
target:add('defines', 'GLFW_DLL', {
25+
interface = true
26+
})
2327
elseif target:is_plat("macosx") then
2428
target:add("files", path.normalize(path.join(os.scriptdir(), "../ext/glfw/src/*.m")))
2529
target:add("mflags", "-fno-objc-arc")

0 commit comments

Comments
 (0)