mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Update cmake to 3.7.2
This commit is contained in:
parent
9b35fd9472
commit
e3654e14c5
2 changed files with 12 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
from distutils.spawn import find_executable
|
from distutils.spawn import find_executable
|
||||||
|
from distutils.version import StrictVersion
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
@ -204,10 +205,19 @@ def windows_msvc(context, force=False):
|
||||||
def package_dir(package):
|
def package_dir(package):
|
||||||
return os.path.join(deps_dir, package, version(package))
|
return os.path.join(deps_dir, package, version(package))
|
||||||
|
|
||||||
|
def check_cmake(version):
|
||||||
|
cmake_path = find_executable("cmake")
|
||||||
|
if cmake_path:
|
||||||
|
cmake = subprocess.Popen([cmake_path, "--version"], stdout=PIPE)
|
||||||
|
cmake_version = cmake.stdout.read().splitlines()[0].replace("cmake version ", "")
|
||||||
|
if StrictVersion(cmake_version) >= StrictVersion(version):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
to_install = {}
|
to_install = {}
|
||||||
for package in packages.WINDOWS_MSVC:
|
for package in packages.WINDOWS_MSVC:
|
||||||
# Don't install CMake if it already exists in PATH
|
# Don't install CMake if it already exists in PATH
|
||||||
if package == "cmake" and find_executable(package):
|
if package == "cmake" and check_cmake(version("cmake")):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not os.path.isdir(package_dir(package)):
|
if not os.path.isdir(package_dir(package)):
|
||||||
|
|
|
@ -18,7 +18,7 @@ WINDOWS_GNU = set([
|
||||||
])
|
])
|
||||||
|
|
||||||
WINDOWS_MSVC = {
|
WINDOWS_MSVC = {
|
||||||
"cmake": "3.6.1",
|
"cmake": "3.7.2",
|
||||||
"moztools": "0.0.1-5",
|
"moztools": "0.0.1-5",
|
||||||
"ninja": "1.7.1",
|
"ninja": "1.7.1",
|
||||||
"openssl": "1.1.0e-vs2015",
|
"openssl": "1.1.0e-vs2015",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue