mirror of
https://github.com/sogou/workflow.git
synced 2026-10-28 19:19:22 +08:00
Merge pull request #1155 from chanchann/master
fix : macos shraed lib install
This commit is contained in:
+7
-3
@@ -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)
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user