summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-09-14 22:44:27 +0800
committerruki <[email protected]>2018-09-14 10:26:45 +0800
commit370fb6fb63d61de86edd503a173f438bba90064f (patch)
tree1c3100391a6721a94d16255d80a733140f16a747
parentb9cd00cacfff6a291904afb00bc7285364cc8560 (diff)
improve to build cmake on linux
-rw-r--r--xmake/repository/packages/c/cmake/xmake.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/repository/packages/c/cmake/xmake.lua b/xmake/repository/packages/c/cmake/xmake.lua
index bfb6bd279..48ad61419 100644
--- a/xmake/repository/packages/c/cmake/xmake.lua
+++ b/xmake/repository/packages/c/cmake/xmake.lua
@@ -7,7 +7,7 @@ package("cmake")
if is_host("macosx") then
add_urls("https://cmake.org/files/v3.11/cmake-3.11.4-Darwin-x86_64.tar.gz")
add_versions("3.11.4", "2b5eb705f036b1906a5e0bce996e9cd56d43d73bdee8318ece3e5ce31657b812")
- elseif is_host("linux") then
+ elseif is_host("linux") and is_arch("x86_64") then
add_urls("https://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.tar.gz")
add_versions("3.11.4", "6dab016a6b82082b8bcd0f4d1e53418d6372015dd983d29367b9153f1a376435")
elseif is_host("windows") then
@@ -28,11 +28,15 @@ package("cmake")
os.cp("CMake.app/Contents/share", package:installdir())
end)
- on_install(function (package)
+ on_install("linux|x86_64", "windows", function (package)
os.cp("bin", package:installdir())
os.cp("share", package:installdir())
end)
+ on_install(function (package)
+ import("package.manager").install("cmake")
+ end)
+
on_test(function (package)
os.vrun("cmake --version")
end)