|
|
@ -12,7 +12,7 @@ package("enkits") |
|
|
|
add_deps("cmake") |
|
|
|
add_deps("cmake") |
|
|
|
add_linkdirs("lib/enkiTS") |
|
|
|
add_linkdirs("lib/enkiTS") |
|
|
|
add_links("enkiTS") |
|
|
|
add_links("enkiTS") |
|
|
|
if is_plat("linux") then |
|
|
|
if is_plat("linux", "bsd") then |
|
|
|
add_syslinks("pthread", "rt") |
|
|
|
add_syslinks("pthread", "rt") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -22,13 +22,13 @@ package("enkits") |
|
|
|
end |
|
|
|
end |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
on_install("windows", "macosx", "linux", function (package) |
|
|
|
on_install(function (package) |
|
|
|
if package:is_plat("linux") then |
|
|
|
if package:is_plat("linux") then |
|
|
|
io.replace("src/TaskScheduler.h", "#include <functional>", "#include <functional>\n#include <initializer_list>\n", {plain = true}) |
|
|
|
io.replace("src/TaskScheduler.h", "#include <functional>", "#include <functional>\n#include <initializer_list>\n", {plain = true}) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
local configs = {"-DENKITS_BUILD_EXAMPLES=OFF", "-DENKITS_INSTALL=ON"} |
|
|
|
local configs = {"-DENKITS_BUILD_EXAMPLES=OFF", "-DENKITS_INSTALL=ON"} |
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
|
|
|
table.insert(configs, "-DENKITS_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF")) |
|
|
|
table.insert(configs, "-DENKITS_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF")) |
|
|
|
import("package.tools.cmake").install(package, configs) |
|
|
|
import("package.tools.cmake").install(package, configs) |
|
|
|
end) |
|
|
|
end) |
|
|
|