mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[vcpkg-tool-meson] Reorder code to allow download mode (#37768)
This commit is contained in:
parent
3a5e1be5ca
commit
30822b6c4c
@ -2,22 +2,6 @@
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_configure_meson.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_install_meson.cmake")
|
||||
|
||||
# Check required python version
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
vcpkg_execute_required_process(COMMAND "${PYTHON3}" --version
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "python3-version-${TARGET_TRIPLET}")
|
||||
|
||||
file(READ "${CURRENT_BUILDTREES_DIR}/python3-version-${TARGET_TRIPLET}-out.log" version_contents)
|
||||
string(REGEX MATCH [[[0-9]+\.[0-9]+\.[0-9]+]] python_ver "${version_contents}")
|
||||
|
||||
set(min_required 3.7)
|
||||
if(python_ver VERSION_LESS "${min_required}")
|
||||
message(FATAL_ERROR "Found Python version '${python_ver} at ${PYTHON3}' is insufficient for meson. meson requires at least version '${min_required}'")
|
||||
else()
|
||||
message(STATUS "Found Python version '${python_ver} at ${PYTHON3}'")
|
||||
endif()
|
||||
|
||||
set(meson_path_hash @MESON_PATH_HASH@)
|
||||
string(SUBSTRING "${meson_path_hash}" 0 6 meson_short_hash)
|
||||
|
||||
@ -39,7 +23,6 @@ if(NOT SCRIPT_MESON)
|
||||
URLS ${download_urls}
|
||||
SHA512 "${download_sha512}"
|
||||
FILENAME "${download_filename}"
|
||||
|
||||
)
|
||||
file(REMOVE_RECURSE "${path_to_search}")
|
||||
file(REMOVE_RECURSE "${path_to_search}-tmp")
|
||||
@ -63,4 +46,20 @@ if(NOT SCRIPT_MESON)
|
||||
set(SCRIPT_MESON "${path_to_search}/meson.py")
|
||||
endif()
|
||||
|
||||
# Check required python version
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
vcpkg_execute_required_process(COMMAND "${PYTHON3}" --version
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "python3-version-${TARGET_TRIPLET}")
|
||||
|
||||
file(READ "${CURRENT_BUILDTREES_DIR}/python3-version-${TARGET_TRIPLET}-out.log" version_contents)
|
||||
string(REGEX MATCH [[[0-9]+\.[0-9]+\.[0-9]+]] python_ver "${version_contents}")
|
||||
|
||||
set(min_required 3.7)
|
||||
if(python_ver VERSION_LESS "${min_required}")
|
||||
message(FATAL_ERROR "Found Python version '${python_ver} at ${PYTHON3}' is insufficient for meson. meson requires at least version '${min_required}'")
|
||||
else()
|
||||
message(STATUS "Found Python version '${python_ver} at ${PYTHON3}'")
|
||||
endif()
|
||||
|
||||
message(STATUS "Using meson: ${SCRIPT_MESON}")
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "vcpkg-tool-meson",
|
||||
"version": "1.3.2",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "Meson build system",
|
||||
"homepage": "https://github.com/mesonbuild/meson",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -9046,7 +9046,7 @@
|
||||
},
|
||||
"vcpkg-tool-meson": {
|
||||
"baseline": "1.3.2",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"vcpkg-tool-mozbuild": {
|
||||
"baseline": "4.0.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "8408112396883b134bd25e2522f9a806ceaae3ea",
|
||||
"version": "1.3.2",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "17b86f3a18ad63659d4dfbafc194969279a7a4f0",
|
||||
"version": "1.3.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user