-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathxmake.lua
More file actions
42 lines (33 loc) · 1.3 KB
/
xmake.lua
File metadata and controls
42 lines (33 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
set_languages("clatest", "cxxlatest")
add_rules("mode.debug", "mode.release")
if is_plat("linux") then
add_syslinks("assimp", "stdc++fs", "pthread", "dl")
on_config(function (target)
local cxxflags = os.iorun("wx-config --cxxflags"):trim()
target:add("cxxflags", table.unpack(string.split(cxxflags, " ")))
local ldflags = os.iorun("wx-config --libs std,aui"):trim()
target:add("ldflags", table.unpack(string.split(ldflags, " ")))
end)
add_defines("__WXGTK__")
else
add_requires("nlohmann_json", "assimp")
end
target("SPETS")
set_kind("binary")
add_packages("nlohmann_json", "assimp")
set_targetdir("bin")
set_objectdir("build/obj")
add_includedirs("src/")
add_files( "src/**.cpp")
if is_plat("windows") then
add_headerfiles{ "src/**.h", "src/**.hpp" }
local WX_ROOT = "D:/SDK/wx/3.3.1/"
add_defines("__WXMSW__", "WXUSINGDLL", "_UNICODE", "wxMSVC_VERSION_AUTO", "wxMSVC_VERSION_ABI_COMPAT", "NDEBUG")
add_includedirs(WX_ROOT .. "include/", WX_ROOT .. "lib/vc14x_x64_dll/mswu/")
add_linkdirs(WX_ROOT .. "lib/vc14x_x64_dll/")
add_files(WX_ROOT .. "include/wx/msw/wx.rc")
end
if is_plat("linux") then
add_packages("wxwidgets")
add_defines("__WXGTK__")
end