mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
[qt6] CMake build adjustments for qt6
This commit is contained in:
parent
8e8febb405
commit
7a56c36d55
@ -451,12 +451,17 @@ if(WITH_CORE)
|
||||
endif()
|
||||
|
||||
find_package(${QT_VERSION_BASE} COMPONENTS Core Gui Widgets Network Xml Svg Concurrent Test UiTools Sql REQUIRED)
|
||||
if (WITH_QT6)
|
||||
find_package(${QT_VERSION_BASE} COMPONENTS Core5Compat REQUIRED)
|
||||
else()
|
||||
# TODO only available starting from Qt 6.2
|
||||
find_package(${QT_VERSION_BASE} COMPONENTS Positioning)
|
||||
endif()
|
||||
if (NOT IOS)
|
||||
find_package(${QT_VERSION_BASE} COMPONENTS PrintSupport REQUIRED)
|
||||
else()
|
||||
add_definitions(-DQT_NO_PRINTER)
|
||||
endif()
|
||||
find_package(${QT_VERSION_BASE} COMPONENTS Positioning)
|
||||
if (WITH_QTWEBKIT AND NOT WITH_QT6)
|
||||
find_package(Qt5WebKit REQUIRED)
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
@ -506,9 +511,6 @@ if(WITH_CORE)
|
||||
endif()
|
||||
|
||||
# Password helper
|
||||
if (WITH_QT6)
|
||||
# nope, not yet!
|
||||
else()
|
||||
find_package(QtKeychain REQUIRED)
|
||||
# Master password hash and authentication encryption
|
||||
find_package(QCA REQUIRED)
|
||||
@ -518,7 +520,6 @@ if(WITH_CORE)
|
||||
include(QCAMacros)
|
||||
FIND_QCAOSSL_PLUGIN_CPP(ENABLE_TESTS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
# Libtasn1 is for DER-encoded PKI ASN.1 parsing/extracting workarounds
|
||||
|
@ -20,7 +20,7 @@ if(QCA_INCLUDE_DIR AND QCA_LIBRARY)
|
||||
|
||||
else(QCA_INCLUDE_DIR AND QCA_LIBRARY)
|
||||
|
||||
set(QCA_LIBRARY_NAMES qca-qt5 qca2-qt5)
|
||||
set(QCA_LIBRARY_NAMES qca-qt5 qca2-qt5 qca-qt6)
|
||||
|
||||
find_library(QCA_LIBRARY
|
||||
NAMES ${QCA_LIBRARY_NAMES}
|
||||
@ -45,7 +45,7 @@ else(QCA_INCLUDE_DIR AND QCA_LIBRARY)
|
||||
"$ENV{LIB_DIR}/include"
|
||||
$ENV{INCLUDE}
|
||||
/usr/local/include
|
||||
PATH_SUFFIXES QtCrypto qt5/QtCrypto Qca-qt5/QtCrypto qt/Qca-qt5/QtCrypto qt5/Qca-qt5/QtCrypto
|
||||
PATH_SUFFIXES QtCrypto qt5/QtCrypto Qca-qt5/QtCrypto qt/Qca-qt5/QtCrypto qt5/Qca-qt5/QtCrypto Qca-qt6/QtCrypto
|
||||
)
|
||||
|
||||
if(QCA_LIBRARY AND QCA_INCLUDE_DIR)
|
||||
|
@ -21,10 +21,10 @@ FIND_PATH(QTKEYCHAIN_INCLUDE_DIR keychain.h
|
||||
$ENV{INCLUDE}
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
PATH_SUFFIXES qt5keychain qtkeychain
|
||||
PATH_SUFFIXES qt5keychain qtkeychain qt6keychain
|
||||
)
|
||||
|
||||
FIND_LIBRARY(QTKEYCHAIN_LIBRARY NAMES qt5keychain qtkeychain
|
||||
FIND_LIBRARY(QTKEYCHAIN_LIBRARY NAMES qt5keychain qtkeychain qt6keychain
|
||||
PATHS
|
||||
${LIB_DIR}
|
||||
"$ENV{LIB_DIR}"
|
||||
|
@ -1925,6 +1925,10 @@ target_link_libraries(qgis_core
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
|
||||
if (WITH_QT6)
|
||||
target_link_libraries(qgis_core Qt6::Core5Compat)
|
||||
endif()
|
||||
|
||||
if (WITH_EPT)
|
||||
target_link_libraries(qgis_core
|
||||
${ZSTD_LIBRARY}
|
||||
|
Loading…
x
Reference in New Issue
Block a user