11using BinDeps
22using BinDeps: MakeTargets
3- using Compat
43
54basedir = dirname (@__FILE__ )
65prefix = joinpath (basedir, " usr" )
76
87cmake_version = v " 3.7.2"
98base_url = " https://cmake.org/files/v$(cmake_version. major) .$(cmake_version. minor) "
10- @static if Compat . Sys. iswindows ()
9+ @static if Sys. iswindows ()
1110 binary_name = " cmake.exe"
1211else
1312 binary_name = " cmake"
@@ -18,18 +17,18 @@ function install_binaries(file_base, file_ext, binary_dir)
1817 url = " $(base_url) /$(filename) "
1918 binary_path = joinpath (basedir, " downloads" , file_base, binary_dir)
2019
21- @static if Compat . Sys. iswindows ()
20+ @static if Sys. iswindows ()
2221 install_step = () -> begin
2322 for dir in readdir (dirname (binary_path))
24- cp (joinpath (dirname (binary_path), dir),
23+ cp (joinpath (dirname (binary_path), dir),
2524 joinpath (prefix, dir);
2625 remove_destination= true )
2726 end
2827 end
2928 else
3029 install_step = () -> begin
3130 for file in readdir (binary_path)
32- symlink (joinpath (binary_path, file),
31+ symlink (joinpath (binary_path, file),
3332 joinpath (prefix, " bin" , file))
3433 end
3534 end
@@ -49,11 +48,11 @@ To build from source instead, run:
4948 end
5049 end
5150 (@build_steps begin
52- FileRule (joinpath (prefix, " bin" , binary_name),
51+ FileRule (joinpath (prefix, " bin" , binary_name),
5352 (@build_steps begin
5453 FileDownloader (url, joinpath (basedir, " downloads" , filename))
5554 FileUnpacker (joinpath (basedir, " downloads" , filename),
56- joinpath (basedir, " downloads" ),
55+ joinpath (basedir, " downloads" ),
5756 " " )
5857 CreateDirectory (joinpath (prefix, " bin" ))
5958 install_step
@@ -67,12 +66,12 @@ function install_from_source(file_base, file_ext)
6766 url = " $(base_url) /$(filename) "
6867
6968 (@build_steps begin
70- FileRule (joinpath (prefix, " bin" , binary_name),
69+ FileRule (joinpath (prefix, " bin" , binary_name),
7170 (@build_steps begin
7271 FileDownloader (url, joinpath (basedir, " downloads" , filename))
7372 CreateDirectory (joinpath (basedir, " src" ))
7473 FileUnpacker (joinpath (basedir, " downloads" , filename),
75- joinpath (basedir, " src" ),
74+ joinpath (basedir, " src" ),
7675 " " )
7776 begin
7877 ChangeDirectory (joinpath (basedir, " src" , file_base))
8685
8786force_source_build = lowercase (get (ENV , " CMAKEWRAPPER_JL_BUILD_FROM_SOURCE" , " " )) in [" 1" , " true" ]
8887
89- process = @static if Compat . Sys. islinux ()
88+ process = @static if Sys. islinux ()
9089 if Sys. ARCH == :x86_64 && ! force_source_build
9190 install_binaries (
9291 " cmake-$(cmake_version) -Linux-x86_64" ,
@@ -95,7 +94,7 @@ process = @static if Compat.Sys.islinux()
9594 else
9695 install_from_source (" cmake-$(cmake_version) " , " tar.gz" )
9796 end
98- elseif Compat . Sys. isapple ()
97+ elseif Sys. isapple ()
9998 if ! force_source_build
10099 install_binaries (
101100 " cmake-$(cmake_version) -Darwin-x86_64" ,
@@ -104,7 +103,7 @@ elseif Compat.Sys.isapple()
104103 else
105104 install_from_source (" cmake-$(cmake_version) " , " tar.gz" )
106105 end
107- elseif Compat . Sys. iswindows ()
106+ elseif Sys. iswindows ()
108107 if sizeof (Int) == 8
109108 install_binaries (
110109 " cmake-$(cmake_version) -win64-x64" ,
0 commit comments