mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-22 09:17:49 +08:00
75bd2efe0d
* [many ports] 2019.09.14 Updates * Revert failure ports * Revert failure ports * Revert failure ports * [urdfdom] Fix find dependency console_bridge * Revert failure ports * [devil] Compatible with jasper 2.0.20 * [devil] Refix compatible with jasper functions declaration on different os * Update ports/alembic/CONTROL Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> * Revert failure ports wangle * [azure-kinect-sensor-sdk] Fix build with matroska 1.6.2 * Revert failure ports * Revert failure ports * [urdfdom-headers] Fix include path in config.cmake file * upload patch * [urdfdom-headers] Refix include path in config.cmake file * [qt5-imageformats] Fix missing include math.h * [urdfdom-headers] Refix include path in config.cmake file * [qt5] Fix adding option PATCHES and other options when using qt_submodule_installation * Remove updated ports version * Commit suggestions * [libideviceactivation] revert Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
41 lines
1.7 KiB
CMake
41 lines
1.7 KiB
CMake
function(qt_get_submodule_name OUT_NAME)
|
|
string(REPLACE "5-" "" _tmp_name ${PORT})
|
|
set(${OUT_NAME} ${_tmp_name} PARENT_SCOPE)
|
|
endfunction()
|
|
|
|
function(qt_download_submodule)
|
|
cmake_parse_arguments(_csc "" "OUT_SOURCE_PATH" "PATCHES;BUILD_OPTIONS;BUILD_OPTIONS_RELEASE;BUILD_OPTIONS_DEBUG" ${ARGN})
|
|
|
|
if(NOT DEFINED _csc_OUT_SOURCE_PATH)
|
|
message(FATAL_ERROR "qt_download_module requires parameter OUT_SOURCE_PATH to be set! Please correct the portfile!")
|
|
endif()
|
|
|
|
vcpkg_buildpath_length_warning(37)
|
|
qt_get_submodule_name(NAME)
|
|
|
|
set(FULL_VERSION "${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}")
|
|
set(ARCHIVE_NAME "${NAME}-everywhere-src-${FULL_VERSION}.tar.xz")
|
|
set(URLS "http://download.qt.io/official_releases/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}"
|
|
"http://mirrors.ocf.berkeley.edu/qt/official_releases/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}"
|
|
)
|
|
vcpkg_download_distfile(ARCHIVE_FILE
|
|
URLS ${URLS}
|
|
FILENAME ${ARCHIVE_NAME}
|
|
SHA512 ${QT_HASH_${PORT}}
|
|
)
|
|
|
|
if(QT_UPDATE_VERSION)
|
|
file(SHA512 "${ARCHIVE_FILE}" ARCHIVE_HASH)
|
|
message(STATUS "${PORT} new hash is ${ARCHIVE_HASH}")
|
|
file(APPEND "${VCPKG_ROOT_DIR}/ports/qt5-base/cmake/qt_new_hashes.cmake" "set(QT_HASH_${PORT} ${ARCHIVE_HASH})\n")
|
|
else()
|
|
vcpkg_extract_source_archive_ex(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
ARCHIVE "${ARCHIVE_FILE}"
|
|
REF ${FULL_VERSION}
|
|
PATCHES ${_csc_PATCHES}
|
|
)
|
|
endif()
|
|
|
|
set(${_csc_OUT_SOURCE_PATH} ${SOURCE_PATH} PARENT_SCOPE)
|
|
endfunction() |