Commit bce2d5eb authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Use Qt5Compat when building against Qt6

Needed for QTextCodec
parent f7d48462
......@@ -37,6 +37,10 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KPUBLICTRANSPORT
find_package(Qt${QT_MAJOR_VERSION} 5.15 REQUIRED COMPONENTS Quick)
if (QT_MAJOR_VERSION STREQUAL 6)
find_package(Qt${QT_MAJOR_VERSION} 5.15 REQUIRED COMPONENTS Core5Compat)
endif()
if (BUILD_TESTING)
find_package(Qt${QT_MAJOR_VERSION} 5.15 REQUIRED COMPONENTS Test Widgets)
endif()
......
......@@ -142,6 +142,10 @@ target_link_libraries(KPublicTransport
ZLIB::ZLIB
)
if (TARGET Qt6::Core5Compat)
target_link_libraries(KPublicTransport PRIVATE Qt6::Core5Compat) # QTextCodec
endif()
ecm_generate_headers(KPublicTransport_FORWARDING_HEADERS
HEADER_NAMES
DepartureReply
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment