mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[qt5-base] Fix QMAKE_MACOSX_DEPLOYMENT_TARGET (#29525)
* [qt5-base] Fix QMAKE_MACOSX_DEPLOYMENT_TARGET * update version database
This commit is contained in:
parent
4bf41e29cf
commit
e039ba75d2
@ -280,32 +280,49 @@ elseif(VCPKG_TARGET_IS_OSX)
|
||||
set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET})
|
||||
else()
|
||||
execute_process(COMMAND xcrun --show-sdk-version
|
||||
OUTPUT_FILE OSX_SDK_VER.txt
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR})
|
||||
FILE(STRINGS "${CURRENT_BUILDTREES_DIR}/OSX_SDK_VER.txt" OSX_SDK_VERSION REGEX "^[0-9][0-9]\.[0-9][0-9]*")
|
||||
OUTPUT_VARIABLE OSX_SDK_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message(STATUS "Detected OSX SDK Version: ${OSX_SDK_VERSION}")
|
||||
string(REGEX MATCH "^[0-9][0-9]\.[0-9][0-9]*" OSX_SDK_VERSION ${OSX_SDK_VERSION})
|
||||
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)" OSX_SDK_VERSION "${OSX_SDK_VERSION}")
|
||||
message(STATUS "Major.Minor OSX SDK Version: ${OSX_SDK_VERSION}")
|
||||
|
||||
execute_process(COMMAND sw_vers -productVersion
|
||||
OUTPUT_FILE OSX_SYS_VER.txt
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR})
|
||||
FILE(STRINGS "${CURRENT_BUILDTREES_DIR}/OSX_SYS_VER.txt" VCPKG_OSX_DEPLOYMENT_TARGET REGEX "^[0-9][0-9]\.[0-9][0-9]*")
|
||||
OUTPUT_VARIABLE VCPKG_OSX_DEPLOYMENT_TARGET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message(STATUS "Detected OSX system Version: ${VCPKG_OSX_DEPLOYMENT_TARGET}")
|
||||
string(REGEX MATCH "^[0-9][0-9]\.[0-9][0-9]*" VCPKG_OSX_DEPLOYMENT_TARGET ${VCPKG_OSX_DEPLOYMENT_TARGET})
|
||||
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)" VCPKG_OSX_DEPLOYMENT_TARGET "${VCPKG_OSX_DEPLOYMENT_TARGET}")
|
||||
message(STATUS "Major.Minor OSX system Version: ${VCPKG_OSX_DEPLOYMENT_TARGET}")
|
||||
|
||||
set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET})
|
||||
if(${VCPKG_OSX_DEPLOYMENT_TARGET} GREATER "10.15") # Max Version supported by QT. This version is defined in mkspecs/common/macx.conf as QT_MAC_SDK_VERSION_MAX
|
||||
message(STATUS "Qt ${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER} only support OSX_DEPLOYMENT_TARGET up to 10.15")
|
||||
set(VCPKG_OSX_DEPLOYMENT_TARGET "10.15")
|
||||
# Parse mkspecs/common/macx.conf
|
||||
file(READ "${SOURCE_PATH}/mkspecs/common/macx.conf" QT_MK_MAC_CONTENT)
|
||||
string(REGEX MATCHALL "QT_MAC_SDK_VERSION_MIN[ \t]*=[ \t]*(([0-9]+)(\\.([0-9]+))*)" KEY_VALUE "${QT_MK_MAC_CONTENT}")
|
||||
if(${CMAKE_MATCH_COUNT} LESS 2)
|
||||
message(FATAL_ERROR "Error parse QT_MAC_SDK_VERSION_MIN")
|
||||
endif()
|
||||
set(QT_MAC_SDK_VERSION_MIN "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCHALL "QT_MAC_SDK_VERSION_MAX[ \t]*=[ \t]*(([0-9]+)(\\.([0-9]+))*)" KEY_VALUE "${QT_MK_MAC_CONTENT}")
|
||||
if(${CMAKE_MATCH_COUNT} LESS 2)
|
||||
message(FATAL_ERROR "Error parse QT_MAC_SDK_VERSION_MAX")
|
||||
endif()
|
||||
set(QT_MAC_SDK_VERSION_MAX "${CMAKE_MATCH_1}")
|
||||
|
||||
message(STATUS "QT_MAC_SDK_VERSION_MIN: ${QT_MAC_SDK_VERSION_MIN}")
|
||||
message(STATUS "QT_MAC_SDK_VERSION_MAX: ${QT_MAC_SDK_VERSION_MAX}")
|
||||
|
||||
# clamp(VCPKG_OSX_DEPLOYMENT_TARGET, QT_MAC_SDK_VERSION_MIN, QT_MAC_SDK_VERSION_MAX)
|
||||
if("${VCPKG_OSX_DEPLOYMENT_TARGET}" VERSION_GREATER "${QT_MAC_SDK_VERSION_MAX}")
|
||||
set(VCPKG_OSX_DEPLOYMENT_TARGET "${QT_MAC_SDK_VERSION_MAX}")
|
||||
endif()
|
||||
if("${VCPKG_OSX_DEPLOYMENT_TARGET}" VERSION_LESS "${QT_MAC_SDK_VERSION_MIN}")
|
||||
set(VCPKG_OSX_DEPLOYMENT_TARGET "${QT_MAC_SDK_VERSION_MIN}")
|
||||
endif()
|
||||
|
||||
set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET})
|
||||
message(STATUS "Enviromnent OSX SDK Version: $ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET}")
|
||||
FILE(READ "${SOURCE_PATH}/mkspecs/common/macx.conf" _tmp_contents)
|
||||
string(REPLACE "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13" "QMAKE_MACOSX_DEPLOYMENT_TARGET = ${VCPKG_OSX_DEPLOYMENT_TARGET}" _tmp_contents ${_tmp_contents})
|
||||
FILE(WRITE "${SOURCE_PATH}/mkspecs/common/macx.conf" ${_tmp_contents})
|
||||
endif()
|
||||
message(STATUS "Enviromnent OSX SDK Version: $ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET}")
|
||||
file(READ "${SOURCE_PATH}/mkspecs/common/macx.conf" _tmp_contents)
|
||||
string(REPLACE "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13" "QMAKE_MACOSX_DEPLOYMENT_TARGET = ${VCPKG_OSX_DEPLOYMENT_TARGET}" _tmp_contents ${_tmp_contents})
|
||||
file(WRITE "${SOURCE_PATH}/mkspecs/common/macx.conf" ${_tmp_contents})
|
||||
#list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_PLATFORM ${TARGET_MKSPEC})
|
||||
list(APPEND RELEASE_OPTIONS
|
||||
"SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread"
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "qt5-base",
|
||||
"version": "5.15.8",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.",
|
||||
"homepage": "https://www.qt.io/",
|
||||
"license": null,
|
||||
|
@ -6270,7 +6270,7 @@
|
||||
},
|
||||
"qt5-base": {
|
||||
"baseline": "5.15.8",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"qt5-canvas3d": {
|
||||
"baseline": "0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "6784bfaa6ca1ddf15b673165041defe84f289a9c",
|
||||
"version": "5.15.8",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "c2fc93e40435da3abae5ab36864d1c2d4aaafb91",
|
||||
"version": "5.15.8",
|
||||
|
Loading…
x
Reference in New Issue
Block a user