-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathxmake.lua
38 lines (29 loc) · 1.06 KB
/
xmake.lua
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
project("coasync")
version("0.0.1")
add_requires("c++20")
includes("include")
add_cxxflags("-fcoroutines -fconcepts -freport-bug -Wno-interference-size")
local is_master_project = os.getcwd() == os.projectdir()
if is_master_project then
if os.is("windows") then
add_cxxflags("/W4")
else
add_cxxflags("-Wall -Wextra -Wdeprecated -Wdocumentation")
end
end
if is_master_project and _OPTIONS["tests"] == "on" then
add_subdirs("tests")
end
package("find")
set_name("coasync")
set_version(project.version())
set_desc("A header-only async library")
set_includedirs("include", {public = true})
set_links("coasync")
rule("install")
on("postbuild", function (target)
os.cp("include/*", os.getenv("prefix") .. "/include")
os.cp("cmake/coasync-config.cmake", os.getenv("prefix") .. "/lib/cmake/coasync")
os.cp("coasync-config-version.cmake", os.getenv("prefix") .. "/lib/cmake/coasync")
end)
add_rules("install")