Merge pull request #1155 from chanchann/master

fix : macos shraed lib install
This commit is contained in:
xiehan
2023-01-19 21:02:49 +08:00
committed by GitHub
2 changed files with 15 additions and 4 deletions
+7 -3
View File
@@ -38,13 +38,17 @@ target("workflow")
end)
on_install(function (target)
os.mkdir(target:installdir("include"))
os.mkdir(target:installdir("lib"))
os.mkdir(path.join(target:installdir(), "include/workflow"))
os.mkdir(path.join(target:installdir(), "lib"))
os.cp(path.join(get_config("workflow_inc"), "workflow"), path.join(target:installdir(), "include"))
shared_suffix = "*.so"
if is_plat("macosx") then
shared_suffix = "*.dylib"
end
if target:is_static() then
os.cp(path.join(get_config("workflow_lib"), "*.a"), path.join(target:installdir(), "lib"))
else
os.cp(path.join(get_config("workflow_lib"), "*.so"), path.join(target:installdir(), "lib"))
os.cp(path.join(get_config("workflow_lib"), shared_suffix), path.join(target:installdir(), "lib"))
end
end)
+8 -1
View File
@@ -10,7 +10,14 @@ option("redis", {description = "build redis component", default = true})
option("upstream", {description = "build upstream component", default = true})
option("memcheck", {description = "valgrind memcheck", default = false})
add_rules("mode.release", "mode.debug")
if is_mode("release") then
set_optimize("faster")
set_strip("all")
elseif is_mode("debug") then
set_symbols("debug")
set_optimize("none")
end
set_languages("c90", "c++11")
set_warnings("all")
set_exceptions("no-cxx")