Commit 93e0896b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: Use versionless Qt cmake target. This makes it easier to build against both Qt5 and Qt6

parent 76b54d5c
Pipeline #49204 skipped
find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
ecm_add_test(stringutiltest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(datatypestest.cpp LINK_LIBRARIES Qt5::Test Qt5::Qml KPim::Itinerary)
ecm_add_test(jsonlddocumenttest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(mergeutiltest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(locationutiltest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(knowledgedbtest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(airportdbtest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(extractorinputtest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(extractorrepositorytest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(berdecodertest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(berencodertest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(bcbpparsertest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(uic9183parsertest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(vdvtickettest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(rct2parsertest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(jsapitest.cpp ../src/jsapi/jsonld.cpp TEST_NAME jsapitest LINK_LIBRARIES Qt5::Test KPim::Itinerary Qt5::Qml)
ecm_add_test(bitarraytest.cpp ../src/jsapi/bitarray.cpp TEST_NAME bitarraytest LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(structureddataextractortest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(pdfdocumenttest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary Qt5::Gui)
ecm_add_test(htmldocumenttest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(barcodedecodertest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary Qt5::Gui)
ecm_add_test(pkpassextractortest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary KPim::PkPass)
ecm_add_test(extractorutiltest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(postprocessortest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(extractorvalidatortest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(stringutiltest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(datatypestest.cpp LINK_LIBRARIES Qt::Test Qt::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)
ecm_add_test(airportdbtest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(extractorinputtest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(extractorrepositorytest.cpp 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/jsapi/jsonld.cpp TEST_NAME jsapitest LINK_LIBRARIES Qt::Test KPim::Itinerary Qt::Qml)
ecm_add_test(bitarraytest.cpp ../src/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::Gui)
ecm_add_test(htmldocumenttest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(barcodedecodertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary Qt::Gui)
ecm_add_test(pkpassextractortest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary KPim::PkPass)
ecm_add_test(extractorutiltest.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)
if (TARGET KF5::CalendarCore)
ecm_add_test(calendarhandlertest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(extractortest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary KPim::PkPass)
ecm_add_test(calendarhandlertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary)
ecm_add_test(extractortest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary KPim::PkPass)
endif()
ecm_add_test(documentutiltest.cpp LINK_LIBRARIES Qt5::Test KPim::Itinerary)
ecm_add_test(filetest.cpp LINK_LIBRARIES Qt5::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)
add_subdirectory(cli)
add_subdirectory(osm)
if (TARGET Qt5::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(vdv/certs)
......@@ -112,10 +112,10 @@ target_include_directories(KPimItinerary PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRE
target_include_directories(KPimItinerary PRIVATE ${CMAKE_BINARY_DIR})
target_link_libraries(KPimItinerary
PUBLIC
Qt5::Core
Qt::Core
KF5::Mime
PRIVATE
Qt5::Qml
Qt::Qml
KF5::Archive
KF5::I18n
KF5::Contacts
......
......@@ -17,7 +17,7 @@ target_include_directories(generate-knowledgedb PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../knowledgedb
${CMAKE_CURRENT_BINARY_DIR}/..
)
target_link_libraries(generate-knowledgedb PRIVATE Qt5::Network Qt5::Gui KOSM)
target_link_libraries(generate-knowledgedb PRIVATE Qt::Network Qt::Gui KOSM)
# 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\")
......
......@@ -6,7 +6,7 @@ add_library(KOSM STATIC
)
target_include_directories(KOSM PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>")
target_link_libraries(KOSM PUBLIC Qt5::Core)
target_link_libraries(KOSM PUBLIC Qt::Core)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KOSM PROPERTIES UNITY_BUILD ON)
endif()
......@@ -10,6 +10,6 @@ add_executable(vdv-cert-downloader
)
target_include_directories(vdv-cert-downloader PRIVATE ${CMAKE_BINARY_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/..)
target_link_libraries(vdv-cert-downloader PRIVATE Qt5::Core OpenSSL::Crypto)
target_link_libraries(vdv-cert-downloader PRIVATE Qt::Core OpenSSL::Crypto)
add_custom_target(vdv-download-certs COMMAND vdv-cert-downloader WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
Markdown is supported
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