mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[qt5-base] make libpq an optional dependency (#16659)
* [qt5-base] make libpq an optional dependency * add version files * [qt5-base] use IN_LIST for feature check * add version files * [qt5-base] set(WITH_PGSQL OFF) * add version files * [qt5-base] set -no-sql-psql * add version files
This commit is contained in:
parent
38b9e63dea
commit
31534bd59b
@ -45,6 +45,11 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
set(WITH_PGSQL OFF)
|
||||
if("postgresqlplugin" IN_LIST FEATURES)
|
||||
set(WITH_PGSQL ON)
|
||||
endif()
|
||||
|
||||
include(qt_port_functions)
|
||||
include(configure_qt)
|
||||
include(install_qt)
|
||||
@ -121,7 +126,6 @@ list(APPEND CORE_OPTIONS
|
||||
-system-doubleconversion
|
||||
-system-sqlite
|
||||
-system-harfbuzz
|
||||
-sql-psql
|
||||
-icu
|
||||
-no-angle) # Qt does not need to build angle. VCPKG will build angle!
|
||||
|
||||
@ -129,6 +133,12 @@ if(QT_OPENSSL_LINK)
|
||||
list(APPEND CORE_OPTIONS -openssl-linked)
|
||||
endif()
|
||||
|
||||
if(WITH_PGSQL)
|
||||
list(APPEND CORE_OPTIONS -sql-psql)
|
||||
else()
|
||||
list(APPEND CORE_OPTIONS -no-sql-psql)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
if(QT_MYSQL_PLUGIN)
|
||||
list(APPEND CORE_OPTIONS -sql-mysql)
|
||||
@ -254,18 +264,20 @@ if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND CORE_OPTIONS -opengl dynamic) # other possible option without moving angle dlls: "-opengl desktop". "-opengel es2" only works with commented patch
|
||||
endif()
|
||||
list(APPEND RELEASE_OPTIONS
|
||||
"PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib"
|
||||
"SQLITE_LIBS=${SQLITE_RELEASE}"
|
||||
"HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} ${FREETYPE_RELEASE_ALL}"
|
||||
"OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib"
|
||||
)
|
||||
|
||||
list(APPEND DEBUG_OPTIONS
|
||||
"PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib"
|
||||
"SQLITE_LIBS=${SQLITE_DEBUG}"
|
||||
"HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} ${FREETYPE_DEBUG_ALL}"
|
||||
"OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib"
|
||||
)
|
||||
if(WITH_PGSQL)
|
||||
list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib")
|
||||
list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib")
|
||||
endif()
|
||||
if (QT_MYSQL_PLUGIN)
|
||||
list(APPEND RELEASE_OPTIONS "MYSQL_LIBS=${MYSQL_RELEASE}")
|
||||
list(APPEND DEBUG_OPTIONS "MYSQL_LIBS=${MYSQL_DEBUG}")
|
||||
@ -277,19 +289,21 @@ elseif(VCPKG_TARGET_IS_LINUX)
|
||||
message(FATAL_ERROR "qt5 requires libgl1-mesa-dev and libglu1-mesa-dev, please use your distribution's package manager to install them.\nExample: \"apt-get install libgl1-mesa-dev libglu1-mesa-dev\"")
|
||||
endif()
|
||||
list(APPEND RELEASE_OPTIONS
|
||||
"PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread"
|
||||
"SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread"
|
||||
"HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} ${FREETYPE_RELEASE_ALL} ${GLIB_RELEASE} -lpthread"
|
||||
"OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread"
|
||||
"FONTCONFIG_LIBS=${FONTCONFIG_RELEASE} ${FREETYPE_RELEASE} ${EXPAT_RELEASE} -luuid"
|
||||
)
|
||||
list(APPEND DEBUG_OPTIONS
|
||||
"PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread"
|
||||
"SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread"
|
||||
"HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} ${FREETYPE_DEBUG_ALL} ${GLIB_DEBUG} -lpthread"
|
||||
"OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread"
|
||||
"FONTCONFIG_LIBS=${FONTCONFIG_DEBUG} ${FREETYPE_DEBUG} ${EXPAT_DEBUG} -luuid"
|
||||
)
|
||||
if(WITH_PGSQL)
|
||||
list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread")
|
||||
list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread")
|
||||
endif()
|
||||
elseif(VCPKG_TARGET_IS_OSX)
|
||||
list(APPEND CORE_OPTIONS -fontconfig)
|
||||
if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET)
|
||||
@ -315,19 +329,22 @@ elseif(VCPKG_TARGET_IS_OSX)
|
||||
endif()
|
||||
#list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_PLATFORM ${TARGET_MKSPEC})
|
||||
list(APPEND RELEASE_OPTIONS
|
||||
"PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread"
|
||||
"SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread"
|
||||
"HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} ${FREETYPE_RELEASE_ALL} -framework ApplicationServices"
|
||||
"OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread"
|
||||
"FONTCONFIG_LIBS=${FONTCONFIG_RELEASE} ${FREETYPE_RELEASE} ${EXPAT_RELEASE} -liconv"
|
||||
)
|
||||
list(APPEND DEBUG_OPTIONS
|
||||
"PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread"
|
||||
"SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread"
|
||||
"HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} ${FREETYPE_DEBUG_ALL} -framework ApplicationServices"
|
||||
"OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread"
|
||||
"FONTCONFIG_LIBS=${FONTCONFIG_DEBUG} ${FREETYPE_DEBUG} ${EXPAT_DEBUG} -liconv"
|
||||
)
|
||||
|
||||
if(WITH_PGSQL)
|
||||
list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread")
|
||||
list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
## Do not build tests or examples
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "qt5-base",
|
||||
"version-string": "5.15.2",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.",
|
||||
"homepage": "https://www.qt.io/",
|
||||
"dependencies": [
|
||||
@ -23,7 +23,6 @@
|
||||
},
|
||||
"libjpeg-turbo",
|
||||
"libpng",
|
||||
"libpq",
|
||||
"openssl",
|
||||
"pcre2",
|
||||
"sqlite3",
|
||||
@ -39,6 +38,12 @@
|
||||
"dependencies": [
|
||||
"libmysql"
|
||||
]
|
||||
},
|
||||
"postgresqlplugin": {
|
||||
"description": "Build the sql plugin for connecting to postgresql databases",
|
||||
"dependencies": [
|
||||
"libpq"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4858,7 +4858,7 @@
|
||||
},
|
||||
"qt5-base": {
|
||||
"baseline": "5.15.2",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"qt5-canvas3d": {
|
||||
"baseline": "0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a21da1425e7bdf8b22cca4da750b57a6cfc2a3ee",
|
||||
"version-string": "5.15.2",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "6ab7ac474099d1ae4d91748acc50330801ed6aed",
|
||||
"version-string": "5.15.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user