mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 19:27:56 +08:00
44 lines
1.7 KiB
CMake
44 lines
1.7 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
|
|
if(BUILDTREES_PATH_LENGTH GREATER 27)
|
|
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
|
|
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
|
|
)
|
|
endif()
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
|
|
endif()
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
set(SRCDIR_NAME "qtwinextras-5.9.2")
|
|
set(ARCHIVE_NAME "qtwinextras-opensource-src-5.9.2")
|
|
set(ARCHIVE_EXTENSION ".tar.xz")
|
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME})
|
|
vcpkg_download_distfile(ARCHIVE_FILE
|
|
URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}"
|
|
FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION}
|
|
SHA512 dbfb89833cc291fade8e9fe2ad9c7b7a78c2032de8dcbca1049d637f829811b99e1852ae39ca73a6eac2960df168765bee28023bb723e69c87e2f3bb50b7ef02
|
|
)
|
|
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
|
if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME})
|
|
file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME})
|
|
endif()
|
|
|
|
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
|
set(ENV{_CL_} "/utf-8")
|
|
|
|
vcpkg_configure_qmake_release(
|
|
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
|
)
|
|
|
|
vcpkg_build_qmake_release()
|
|
|
|
vcpkg_configure_qmake_debug(
|
|
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
|
)
|
|
|
|
vcpkg_build_qmake_debug() |