summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2020-04-21 23:45:36 +0800
committerruki <[email protected]>2020-04-21 16:33:40 +0800
commitb043d9eb23c8086aa4f70b060e4041c2971c8bcc (patch)
tree8b7f489ccde3dc45c4da98ef43d8c44718dfc755 /core/src
parenta45fd8ca3b63a8fe9c21fdc9a87e71c01054422e (diff)
improve headerfiles in core/xmake.lua
Diffstat (limited to 'core/src')
-rw-r--r--core/src/demo/xmake.lua5
-rw-r--r--core/src/luajit/xmake.lua2
-rw-r--r--core/src/xmake/xmake.lua5
3 files changed, 11 insertions, 1 deletions
diff --git a/core/src/demo/xmake.lua b/core/src/demo/xmake.lua
index 4e7c0b1af..6eeb0c771 100644
--- a/core/src/demo/xmake.lua
+++ b/core/src/demo/xmake.lua
@@ -1,6 +1,11 @@
-- add target
target("demo")
+ -- disable this target if only build libaries
+ if has_config("onlylib") then
+ set_default(false)
+ end
+
-- add deps
add_deps("xmake")
diff --git a/core/src/luajit/xmake.lua b/core/src/luajit/xmake.lua
index a26b11e67..cb204daf6 100644
--- a/core/src/luajit/xmake.lua
+++ b/core/src/luajit/xmake.lua
@@ -21,7 +21,7 @@ target("luajit")
end
-- add header files
- add_headerfiles("luajit/src/(*.h)")
+ add_headerfiles("luajit/src/(*.h)", {prefixdir = "luajit"})
-- add include directories
add_includedirs(autogendir)
diff --git a/core/src/xmake/xmake.lua b/core/src/xmake/xmake.lua
index 36f8131e1..df9bbe11d 100644
--- a/core/src/xmake/xmake.lua
+++ b/core/src/xmake/xmake.lua
@@ -21,6 +21,11 @@ target("xmake")
add_includedirs("..", {interface = true})
add_includedirs("$(buildir)/$(plat)/$(arch)/$(mode)", {public = true})
+ -- add header files
+ add_headerfiles("../(xmake/*.h)")
+ add_headerfiles("../(xmake/prefix/*.h)")
+ add_headerfiles("$(buildir)/$(plat)/$(arch)/$(mode)/xmake.config.h", {prefixdir = "xmake"})
+
-- add the common source files
add_files("**.c|winos/*.c")
if is_plat("windows", "msys", "cygwin") then