Commit 5d2a92ff authored by Laurent Montel's avatar Laurent Montel
Browse files

Use Qt:: directly

parent 71ffec3f
Pipeline #220024 passed with stage
in 4 minutes and 31 seconds
......@@ -4,39 +4,39 @@
find_package(Qt${QT_MAJOR_VERSION}Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
ecm_add_test(stringutiltest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary KF5::Codecs)
ecm_add_test(datatypestest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Qml KPim::Itinerary)
ecm_add_test(jsonlddocumenttest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(mergeutiltest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(locationutiltest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(knowledgedbtest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary KF5::I18nLocaleData)
ecm_add_test(airportnametokenizertest.cpp ../src/lib/knowledgedb/airportnametokenizer.cpp TEST_NAME airportnametokenizertest LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(airportdbtest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary KF5::I18nLocaleData)
ecm_add_test(extractorresulttest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(extractordocumentnodetest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(extractorfiltertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(extractorrepositorytest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(extractorscriptenginetest.cpp extractorscriptenginetest.qrc TEST_NAME extractorscriptenginetest LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(berdecodertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(berencodertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(bcbpparsertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(uic9183parsertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(vdvtickettest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(rct2parsertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(jsapitest.cpp ../src/lib/jsapi/jsonld.cpp TEST_NAME jsapitest LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary Qt${QT_MAJOR_VERSION}::Qml)
ecm_add_test(bitarraytest.cpp ../src/lib/jsapi/bitarray.cpp TEST_NAME bitarraytest LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(structureddataextractortest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(pdfdocumenttest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary Qt${QT_MAJOR_VERSION}::Gui)
ecm_add_test(htmldocumenttest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(barcodedecodertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary Qt${QT_MAJOR_VERSION}::Gui)
ecm_add_test(pkpassextractortest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary KPim::PkPass)
ecm_add_test(terminalfindertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(extractorutiltest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(addressparsertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary KF5::Contacts)
ecm_add_test(timefindertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(postprocessortest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(extractorvalidatortest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(calendarhandlertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary KF5::Contacts KF5::CalendarCore)
ecm_add_test(extractortest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary KPim::PkPass)
ecm_add_test(documentutiltest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(filetest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary KPim::PkPass)
ecm_add_test(stringutiltest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary KF5::Codecs)
ecm_add_test(datatypestest.cpp LINK_LIBRARIES Qt::Test Qt${QT_MAJOR_VERSION}::Qml KPim::Itinerary)
ecm_add_test(jsonlddocumenttest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(mergeutiltest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(locationutiltest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(knowledgedbtest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary KF5::I18nLocaleData)
ecm_add_test(airportnametokenizertest.cpp ../src/lib/knowledgedb/airportnametokenizer.cpp TEST_NAME airportnametokenizertest LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(airportdbtest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary KF5::I18nLocaleData)
ecm_add_test(extractorresulttest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(extractordocumentnodetest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(extractorfiltertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(extractorrepositorytest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(extractorscriptenginetest.cpp extractorscriptenginetest.qrc TEST_NAME extractorscriptenginetest LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(berdecodertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(berencodertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(bcbpparsertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(uic9183parsertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(vdvtickettest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(rct2parsertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(jsapitest.cpp ../src/lib/jsapi/jsonld.cpp TEST_NAME jsapitest LINK_LIBRARIES Qt::Test KPim::Itinerary Qt${QT_MAJOR_VERSION}::Qml)
ecm_add_test(bitarraytest.cpp ../src/lib/jsapi/bitarray.cpp TEST_NAME bitarraytest LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(structureddataextractortest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(pdfdocumenttest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary Qt${QT_MAJOR_VERSION}::Gui)
ecm_add_test(htmldocumenttest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(barcodedecodertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary Qt${QT_MAJOR_VERSION}::Gui)
ecm_add_test(pkpassextractortest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary KPim::PkPass)
ecm_add_test(terminalfindertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(extractorutiltest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(addressparsertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary KF5::Contacts)
ecm_add_test(timefindertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(postprocessortest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(extractorvalidatortest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(calendarhandlertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary KF5::Contacts KF5::CalendarCore)
ecm_add_test(extractortest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary KPim::PkPass)
ecm_add_test(documentutiltest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(filetest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary KPim::PkPass)
......@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-3-Clause
add_subdirectory(osm)
if (TARGET Qt${QT_MAJOR_VERSION}::Network AND NOT CMAKE_CROSSCOMPILING AND OSM_PLANET_DIR AND OsmTools_FOUND)
if (TARGET Qt::Network AND NOT CMAKE_CROSSCOMPILING AND OSM_PLANET_DIR AND OsmTools_FOUND)
add_subdirectory(knowledgedb-generator)
endif()
add_subdirectory(lib)
......
......@@ -22,7 +22,7 @@ target_include_directories(generate-knowledgedb PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../lib/knowledgedb
${CMAKE_CURRENT_BINARY_DIR}/../lib
)
target_link_libraries(generate-knowledgedb PRIVATE Qt${QT_MAJOR_VERSION}::Network Qt${QT_MAJOR_VERSION}::Gui KOSM KF5::Codecs)
target_link_libraries(generate-knowledgedb PRIVATE Qt::Network Qt::Gui KOSM KF5::Codecs)
# extract all elements we are interested in (airports, terminals, stations at airports)
osm_filter(OUTPUT airports.o5m FILTER --keep=\"iata=* or aeroway=terminal or public_transport=station or railway=station or railway=halt or railway=tram_stop\")
......
......@@ -174,10 +174,10 @@ target_include_directories(KPimItinerary PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRE
target_include_directories(KPimItinerary PRIVATE ${CMAKE_BINARY_DIR})
target_link_libraries(KPimItinerary
PUBLIC
Qt${QT_MAJOR_VERSION}::Core
Qt::Core
KF5::Mime
PRIVATE
Qt${QT_MAJOR_VERSION}::Qml
Qt::Qml
KF5::Archive
KF5::I18n
KF5::I18nLocaleData
......
......@@ -8,6 +8,6 @@ add_executable(vdv-cert-downloader
)
target_include_directories(vdv-cert-downloader PRIVATE ${CMAKE_BINARY_DIR}/src/lib ${CMAKE_CURRENT_SOURCE_DIR}/..)
target_link_libraries(vdv-cert-downloader PRIVATE Qt${QT_MAJOR_VERSION}::Core OpenSSL::Crypto KPimItinerary)
target_link_libraries(vdv-cert-downloader PRIVATE Qt::Core OpenSSL::Crypto KPimItinerary)
add_custom_target(vdv-download-certs COMMAND vdv-cert-downloader WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -10,7 +10,7 @@ add_library(KOSM STATIC
)
target_include_directories(KOSM PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>")
target_link_libraries(KOSM PUBLIC Qt${QT_MAJOR_VERSION}::Core)
target_link_libraries(KOSM PUBLIC Qt::Core)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KOSM PROPERTIES UNITY_BUILD ON)
endif()
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