diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,14 +95,6 @@ cmake_minimum_required(VERSION 2.8.12) set(MARBLEWIDGET marblewidget-qt5) -include_directories( ${Qt5Svg_INCLUDE_DIRS} ) -include_directories( ${Qt5PrintSupport_INCLUDE_DIRS} ) -include_directories( ${Qt5Network_INCLUDE_DIRS} ) -include_directories( ${Qt5Script_INCLUDE_DIRS} ) -include_directories( ${Qt5Test_INCLUDE_DIRS} ) -include_directories( ${Qt5Xml_INCLUDE_DIRS} ) -include_directories( ${Qt5Sql_INCLUDE_DIRS} ) - SET(CMAKE_AUTOMOC TRUE) # Use M_PI under Windows diff --git a/MarbleMacros.cmake b/MarbleMacros.cmake --- a/MarbleMacros.cmake +++ b/MarbleMacros.cmake @@ -85,8 +85,7 @@ add_executable( ${TEST_NAME} ${${TEST_NAME}_SRCS} ) target_link_libraries( ${TEST_NAME} ${MARBLEWIDGET} ) - target_link_libraries( ${TEST_NAME} ${Qt5Test_LIBRARIES} - ${Qt5DBus_LIBRARIES} ) + target_link_libraries( ${TEST_NAME} Qt5::Test ) set_target_properties( ${TEST_NAME} PROPERTIES COMPILE_FLAGS "-DDATA_PATH=\"\\\"${DATA_PATH}\\\"\" -DPLUGIN_PATH=\"\\\"${PLUGIN_PATH}\\\"\"" ) diff --git a/data/lang/CMakeLists.txt b/data/lang/CMakeLists.txt --- a/data/lang/CMakeLists.txt +++ b/data/lang/CMakeLists.txt @@ -9,7 +9,7 @@ set( ${TARGET}_SRC merge_ts_po.cpp ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) +target_link_libraries( ${TARGET} Qt5::Core ) # MARBLE_WRAP_PO(qmfiles pofile1 pofile2 ... ) MACRO(MARBLE_WRAP_PO qmfiles) diff --git a/examples/cpp/animation-video/CMakeLists.txt b/examples/cpp/animation-video/CMakeLists.txt --- a/examples/cpp/animation-video/CMakeLists.txt +++ b/examples/cpp/animation-video/CMakeLists.txt @@ -10,6 +10,5 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${OpenCV_LIBS} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION bin ) diff --git a/examples/cpp/basic-routing/CMakeLists.txt b/examples/cpp/basic-routing/CMakeLists.txt --- a/examples/cpp/basic-routing/CMakeLists.txt +++ b/examples/cpp/basic-routing/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} Readme.txt DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/custom-layers/CMakeLists.txt b/examples/cpp/custom-layers/CMakeLists.txt --- a/examples/cpp/custom-layers/CMakeLists.txt +++ b/examples/cpp/custom-layers/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} Readme.txt DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/geopainter/CMakeLists.txt b/examples/cpp/geopainter/CMakeLists.txt --- a/examples/cpp/geopainter/CMakeLists.txt +++ b/examples/cpp/geopainter/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} Readme.txt DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/hello-marble/CMakeLists.txt b/examples/cpp/hello-marble/CMakeLists.txt --- a/examples/cpp/hello-marble/CMakeLists.txt +++ b/examples/cpp/hello-marble/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} Readme.txt DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/kml-inspector/CMakeLists.txt b/examples/cpp/kml-inspector/CMakeLists.txt --- a/examples/cpp/kml-inspector/CMakeLists.txt +++ b/examples/cpp/kml-inspector/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} Readme.txt DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/kml-screenshot/CMakeLists.txt b/examples/cpp/kml-screenshot/CMakeLists.txt --- a/examples/cpp/kml-screenshot/CMakeLists.txt +++ b/examples/cpp/kml-screenshot/CMakeLists.txt @@ -10,6 +10,5 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION bin ) diff --git a/examples/cpp/map-controls/CMakeLists.txt b/examples/cpp/map-controls/CMakeLists.txt --- a/examples/cpp/map-controls/CMakeLists.txt +++ b/examples/cpp/map-controls/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} Readme.txt DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/map-properties/CMakeLists.txt b/examples/cpp/map-properties/CMakeLists.txt --- a/examples/cpp/map-properties/CMakeLists.txt +++ b/examples/cpp/map-properties/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} Readme.txt DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/marble-game/CMakeLists.txt b/examples/cpp/marble-game/CMakeLists.txt --- a/examples/cpp/marble-game/CMakeLists.txt +++ b/examples/cpp/marble-game/CMakeLists.txt @@ -27,8 +27,6 @@ ${MARBLEWIDGET} marbleui) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) - install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRCS} DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES CMakeLists.txt.external DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} RENAME CMakeLists.txt ) diff --git a/examples/cpp/marbleQuick2/CMakeLists.txt b/examples/cpp/marbleQuick2/CMakeLists.txt --- a/examples/cpp/marbleQuick2/CMakeLists.txt +++ b/examples/cpp/marbleQuick2/CMakeLists.txt @@ -12,7 +12,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ${marble_QRCS} ) target_link_libraries( ${TARGET} ${OpenCV_LIBRARIES} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES} ${Qt5Widget_LIBRARIES} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} marbledeclarative ) add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different diff --git a/examples/cpp/overlay-rendering/CMakeLists.txt b/examples/cpp/overlay-rendering/CMakeLists.txt --- a/examples/cpp/overlay-rendering/CMakeLists.txt +++ b/examples/cpp/overlay-rendering/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} Readme.txt DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/pie-charts/CMakeLists.txt b/examples/cpp/pie-charts/CMakeLists.txt --- a/examples/cpp/pie-charts/CMakeLists.txt +++ b/examples/cpp/pie-charts/CMakeLists.txt @@ -10,6 +10,5 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION bin ) diff --git a/examples/cpp/reverse-geocoding/CMakeLists.txt b/examples/cpp/reverse-geocoding/CMakeLists.txt --- a/examples/cpp/reverse-geocoding/CMakeLists.txt +++ b/examples/cpp/reverse-geocoding/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} Readme.txt DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/route-image/CMakeLists.txt b/examples/cpp/route-image/CMakeLists.txt --- a/examples/cpp/route-image/CMakeLists.txt +++ b/examples/cpp/route-image/CMakeLists.txt @@ -10,6 +10,5 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION bin ) diff --git a/examples/cpp/search/CMakeLists.txt b/examples/cpp/search/CMakeLists.txt --- a/examples/cpp/search/CMakeLists.txt +++ b/examples/cpp/search/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} Readme.txt DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/squad-interpolation/CMakeLists.txt b/examples/cpp/squad-interpolation/CMakeLists.txt --- a/examples/cpp/squad-interpolation/CMakeLists.txt +++ b/examples/cpp/squad-interpolation/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/examples/cpp/tour-preview/CMakeLists.txt b/examples/cpp/tour-preview/CMakeLists.txt --- a/examples/cpp/tour-preview/CMakeLists.txt +++ b/examples/cpp/tour-preview/CMakeLists.txt @@ -10,6 +10,5 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${OpenCV_LIBS} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION bin ) diff --git a/examples/cpp/vehicletracking/CMakeLists.txt b/examples/cpp/vehicletracking/CMakeLists.txt --- a/examples/cpp/vehicletracking/CMakeLists.txt +++ b/examples/cpp/vehicletracking/CMakeLists.txt @@ -10,7 +10,6 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ) target_link_libraries( ${TARGET} ${MARBLEWIDGET} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) install( TARGETS ${TARGET} RUNTIME DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) install( FILES ${${TARGET}_SRC} DESTINATION ${MARBLE_EXAMPLES_INSTALL_DIR}/${TARGET} ) diff --git a/src/apps/behaim/CMakeLists.txt b/src/apps/behaim/CMakeLists.txt --- a/src/apps/behaim/CMakeLists.txt +++ b/src/apps/behaim/CMakeLists.txt @@ -7,31 +7,36 @@ set(TARGET MarbleBehaim) find_package(Qt5AndroidExtras) - include_directories(${Qt5AndroidExtras_INCLUDE_DIRS}) add_library (${TARGET} SHARED ${marble_SRCS} ${marble_QRCS}) + + # while not directly linked, need to be listed here to have deployqt pick up those libs + target_link_libraries ( + ${TARGET} + ${MARBLEWIDGET} + astro + Qt5::Concurrent + Qt5::Xml + Qt5::Widgets + Qt5::PrintSupport + Qt5::Network + Qt5::Script + Qt5::Sql + Qt5::Svg + Qt5::Location + Qt5::Positioning + Qt5::AndroidExtras + Qt5::Multimedia + ) else() set(TARGET marble-behaim) add_executable (${TARGET} ${marble_SRCS} ${marble_QRCS}) endif() target_link_libraries ( - ${TARGET} - ${Qt5Core_LIBRARIES} - ${Qt5Xml_LIBRARIES} - ${Qt5Widgets_LIBRARIES} - ${Qt5PrintSupport_LIBRARIES} - ${Qt5Network_LIBRARIES} - ${Qt5WebKitWidgets_LIBRARIES} - ${Qt5WebKit_LIBRARIES} - ${Qt5Sql_LIBRARIES} - ${Qt5Location_LIBRARIES} - ${Qt5Positioning_LIBRARIES} - ${Qt5AndroidExtras_LIBRARIES} - ${Qt5Multimedia_LIBRARIES} - astro - ${MARBLEWIDGET} - marbledeclarative) + ${TARGET} + marbledeclarative +) FILE(GLOB QML_FILES *.qml) add_custom_target(marble-behaim_resources ALL SOURCES ${QML_FILES} package/AndroidManifest.xml) diff --git a/src/apps/marble-maps/CMakeLists.txt b/src/apps/marble-maps/CMakeLists.txt --- a/src/apps/marble-maps/CMakeLists.txt +++ b/src/apps/marble-maps/CMakeLists.txt @@ -7,31 +7,36 @@ set(TARGET Marble) find_package(Qt5AndroidExtras) - include_directories(${Qt5AndroidExtras_INCLUDE_DIRS}) add_library (${TARGET} SHARED ${marble_SRCS} ${marble_QRCS}) + + # while not directly linked, need to be listed here to have deployqt pick up those libs + target_link_libraries ( + ${TARGET} + ${MARBLEWIDGET} + astro + Qt5::Concurrent + Qt5::Xml + Qt5::Widgets + Qt5::PrintSupport + Qt5::Network + Qt5::Script + Qt5::Sql + Qt5::Svg + Qt5::Location + Qt5::Positioning + Qt5::AndroidExtras + Qt5::Multimedia + ) else() set(TARGET marble-maps) add_executable (${TARGET} ${marble_SRCS} ${marble_QRCS}) endif() target_link_libraries ( - ${TARGET} - ${Qt5Core_LIBRARIES} - ${Qt5Xml_LIBRARIES} - ${Qt5Widgets_LIBRARIES} - ${Qt5PrintSupport_LIBRARIES} - ${Qt5Network_LIBRARIES} - ${Qt5WebKitWidgets_LIBRARIES} - ${Qt5WebKit_LIBRARIES} - ${Qt5Sql_LIBRARIES} - ${Qt5Location_LIBRARIES} - ${Qt5Positioning_LIBRARIES} - ${Qt5AndroidExtras_LIBRARIES} - ${Qt5Multimedia_LIBRARIES} - astro - ${MARBLEWIDGET} - marbledeclarative) + ${TARGET} + marbledeclarative +) FILE(GLOB QML_FILES *.qml) add_custom_target(marble-maps_resources ALL SOURCES ${QML_FILES} package/AndroidManifest.xml) diff --git a/src/apps/marble-qt/CMakeLists.txt b/src/apps/marble-qt/CMakeLists.txt --- a/src/apps/marble-qt/CMakeLists.txt +++ b/src/apps/marble-qt/CMakeLists.txt @@ -25,13 +25,11 @@ target_link_libraries ( marble-qt -${Qt5Core_LIBRARIES} -${Qt5Xml_LIBRARIES} -${Qt5Widgets_LIBRARIES} -${Qt5PrintSupport_LIBRARIES} -${Qt5Network_LIBRARIES} -${Qt5WebKitWidgets_LIBRARIES} -${Qt5WebKit_LIBRARIES} +Qt5::Xml +Qt5::Widgets +Qt5::PrintSupport +Qt5::Network +Qt5::WebKitWidgets marbleui ${MARBLEWIDGET} astro) diff --git a/src/apps/marble-touch/CMakeLists.txt b/src/apps/marble-touch/CMakeLists.txt --- a/src/apps/marble-touch/CMakeLists.txt +++ b/src/apps/marble-touch/CMakeLists.txt @@ -16,11 +16,9 @@ add_executable( marble-touch ${my_SRCS} ) target_link_libraries ( marble-touch - ${Qt5Core_LIBRARIES} - ${Qt5Widgets_LIBRARIES} - ${Qt5Network_LIBRARIES} - ${Qt5WebKitWidgets_LIBRARIES} - ${Qt5WebKit_LIBRARIES} + Qt5::Widgets + Qt5::Network + Qt5::WebKitWidgets ${MARBLEWIDGET} marbledeclarative ) diff --git a/src/apps/marble-ui/CMakeLists.txt b/src/apps/marble-ui/CMakeLists.txt --- a/src/apps/marble-ui/CMakeLists.txt +++ b/src/apps/marble-ui/CMakeLists.txt @@ -11,28 +11,34 @@ add_library (marbleui STATIC ${marble_SRCS}) +# TODO: use PUBLIC/PRIVATE everywhere instead of LINK_PUBLIC/LINK_PRIVATE +# once SailfishOS has cmake >= 2.8.12 + target_link_libraries ( marbleui - ${Qt5Core_LIBRARIES} - ${Qt5Xml_LIBRARIES} - ${Qt5Widgets_LIBRARIES} - ${Qt5PrintSupport_LIBRARIES} - ${Qt5Network_LIBRARIES} - ${Qt5WebKitWidgets_LIBRARIES} - ${Qt5WebKit_LIBRARIES} - ${MARBLEWIDGET}) + LINK_PUBLIC + ${MARBLEWIDGET} + Qt5::Widgets + Qt5::PrintSupport + LINK_PRIVATE + Qt5::Network + Qt5::DBus +) if(WIN32) + # TODO: PUBLIC or can be PRIVATE? target_link_libraries( marbleui - ws2_32 - imm32 - winmm + LINK_PUBLIC + ws2_32 + imm32 + winmm ) endif(WIN32) ## this works for win32 only because FindQt does not handle this correct if(STATIC_BUILD) - target_link_libraries(marble ${QT_PLUGINS_DIR}/imageformats/qjpeg.lib) - target_link_libraries(marble ${QT_PLUGINS_DIR}/imageformats/qsvg.lib) + # TODO: PUBLIC or can be PRIVATE? + target_link_libraries(marble LINK_PUBLIC ${QT_PLUGINS_DIR}/imageformats/qjpeg.lib) + target_link_libraries(marble LINK_PUBLIC ${QT_PLUGINS_DIR}/imageformats/qsvg.lib) endif(STATIC_BUILD) diff --git a/src/lib/marble/CMakeLists.txt b/src/lib/marble/CMakeLists.txt --- a/src/lib/marble/CMakeLists.txt +++ b/src/lib/marble/CMakeLists.txt @@ -36,7 +36,6 @@ set(GENERIC_LIB_SOVERSION "25") endif() -# link_directories (${QT_LIBRARY_DIR}) ########### next target ############### if(MARBLE_NO_WEBKITWIDGETS) @@ -356,38 +355,55 @@ ADD_LIBRARY(${MARBLEWIDGET} SHARED ${marblewidget_SRCS} ${SOURCES_UI_HDRS}) +# TODO: use PUBLIC/PRIVATE everywhere instead of LINK_PUBLIC/LINK_PRIVATE +# once SailfishOS has cmake >= 2.8.12 + # link with libastro -TARGET_LINK_LIBRARIES (${MARBLEWIDGET} astro) +TARGET_LINK_LIBRARIES (${MARBLEWIDGET} LINK_PRIVATE astro) # link against zlib -TARGET_LINK_LIBRARIES (${MARBLEWIDGET} ${ZLIB_LIBRARIES}) +TARGET_LINK_LIBRARIES (${MARBLEWIDGET} LINK_PRIVATE ${ZLIB_LIBRARIES}) # link with release version of Qt libs TARGET_LINK_LIBRARIES (${MARBLEWIDGET} -${Qt5Core_LIBRARIES} -${Qt5Xml_LIBRARIES} -${Qt5Widgets_LIBRARIES} -${Qt5Gui_LIBRARIES} -${Qt5WebKitWidgets_LIBRARIES} -${Qt5Svg_LIBRARIES} -${Qt5Script_LIBRARIES} -${Qt5Quick_LIBRARIES} -${Qt5PrintSupport_LIBRARIES} -${Qt5DBus_LIBRARIES} -${Qt5Concurrent_LIBRARIES} + LINK_PUBLIC + Qt5::Xml + Qt5::Gui + Qt5::Widgets + Qt5::Quick + LINK_PRIVATE + Qt5::Svg + Qt5::Script + Qt5::PrintSupport + Qt5::Concurrent ) +if (NOT MARBLE_NO_WEBKITWIDGETS) + TARGET_LINK_LIBRARIES (${MARBLEWIDGET} + LINK_PUBLIC + Qt5::WebKitWidgets + ) +endif () +if (NOT QT_NO_DBUS AND NOT CMAKE_SYSTEM_NAME STREQUAL Android) + TARGET_LINK_LIBRARIES (${MARBLEWIDGET} + LINK_PRIVATE + Qt5::DBus + ) +endif () if (APPLE) + # TODO: PUBLIC or can be PRIVATE? #defined in top level makefile - TARGET_LINK_LIBRARIES(${MARBLEWIDGET} ${MAC_EXTRA_LIBS} ) + TARGET_LINK_LIBRARIES(${MARBLEWIDGET} LINK_PUBLIC ${MAC_EXTRA_LIBS} ) endif (APPLE) +# TODO: still supported? if (CMAKE_SYSTEM_NAME MATCHES "SunOS") - TARGET_LINK_LIBRARIES(${MARBLEWIDGET} m) + TARGET_LINK_LIBRARIES(${MARBLEWIDGET} LINK_PUBLIC m) endif (CMAKE_SYSTEM_NAME MATCHES "SunOS") if(WIN32) - TARGET_LINK_LIBRARIES(${MARBLEWIDGET} ws2_32 imm32 winmm) + # TODO: PUBLIC or can be PRIVATE? + TARGET_LINK_LIBRARIES(${MARBLEWIDGET} LINK_PUBLIC ws2_32 imm32 winmm) endif(WIN32) if(NOT CMAKE_SYSTEM_NAME STREQUAL Android) diff --git a/src/lib/marble/declarative/CMakeLists.txt b/src/lib/marble/declarative/CMakeLists.txt --- a/src/lib/marble/declarative/CMakeLists.txt +++ b/src/lib/marble/declarative/CMakeLists.txt @@ -1,9 +1,9 @@ PROJECT( MarbleDeclarativePlugin ) macro_optional_find_package(Qt5Positioning) -if(Qt5Positioning_LIBRARIES) +if(Qt5Positioning_FOUND) add_definitions(-DHAVE_QT5_POSITIONING) -endif(Qt5Positioning_LIBRARIES) +endif(Qt5Positioning_FOUND) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} @@ -42,11 +42,22 @@ marble_add_project_resources(qmldir) +# TODO: use PUBLIC/PRIVATE everywhere instead of LINK_PUBLIC/LINK_PRIVATE +# once SailfishOS has cmake >= 2.8.12 + target_link_libraries( marbledeclarative - ${Qt5Quick_LIBRARIES} - ${Qt5Positioning_LIBRARIES} - ${MARBLEWIDGET} + LINK_PUBLIC + Qt5::Quick + ${MARBLEWIDGET} + LINK_PRIVATE + Qt5::Script ) +if(Qt5Positioning_FOUND) + target_link_libraries( marbledeclarative + LINK_PRIVATE + Qt5::Positioning + ) +endif() set_target_properties( marbledeclarative PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE diff --git a/src/plugins/positionprovider/qtpositioning/CMakeLists.txt b/src/plugins/positionprovider/qtpositioning/CMakeLists.txt --- a/src/plugins/positionprovider/qtpositioning/CMakeLists.txt +++ b/src/plugins/positionprovider/qtpositioning/CMakeLists.txt @@ -9,6 +9,6 @@ QtPositioningPositionProviderPlugin.cpp ) -SET( QtPositioningPositionProviderPlugin_LIBS ${Qt5Location_LIBRARIES} ${Qt5Positioning_LIBRARIES} ) +SET( QtPositioningPositionProviderPlugin_LIBS Qt5::Location Qt5::Positioning ) MARBLE_ADD_PLUGIN( QtPositioningPositionProviderPlugin ${qtpositioning_SRCS} ) diff --git a/src/plugins/render/compass/CMakeLists.txt b/src/plugins/render/compass/CMakeLists.txt --- a/src/plugins/render/compass/CMakeLists.txt +++ b/src/plugins/render/compass/CMakeLists.txt @@ -10,4 +10,6 @@ qt_wrap_ui( compass_SRCS ${compass_UI} ) qt_add_resources( compass_SRCS compass.qrc ) +set( CompassFloatItem_LIBS Qt5::Svg ) + marble_add_plugin( CompassFloatItem ${compass_SRCS} ) diff --git a/src/plugins/render/crosshairs/CMakeLists.txt b/src/plugins/render/crosshairs/CMakeLists.txt --- a/src/plugins/render/crosshairs/CMakeLists.txt +++ b/src/plugins/render/crosshairs/CMakeLists.txt @@ -10,5 +10,6 @@ qt_wrap_ui( crosshairs_SRCS ${crosshairs_UI} ) qt_add_resources( crosshairs_SRCS crosshairs.qrc ) +set( CrosshairsPlugin_LIBS Qt5::Svg ) marble_add_plugin( CrosshairsPlugin ${crosshairs_SRCS} ) diff --git a/src/plugins/render/earthquake/CMakeLists.txt b/src/plugins/render/earthquake/CMakeLists.txt --- a/src/plugins/render/earthquake/CMakeLists.txt +++ b/src/plugins/render/earthquake/CMakeLists.txt @@ -15,4 +15,6 @@ qt_wrap_ui(my_SRCS ${earthquake_UI}) qt_add_resources(my_SRCS earthquake.qrc) +set( EarthquakePlugin_LIBS Qt5::Script Qt5::Svg ) + marble_add_plugin( EarthquakePlugin ${my_SRCS} ) diff --git a/src/plugins/render/foursquare/CMakeLists.txt b/src/plugins/render/foursquare/CMakeLists.txt --- a/src/plugins/render/foursquare/CMakeLists.txt +++ b/src/plugins/render/foursquare/CMakeLists.txt @@ -11,5 +11,7 @@ FoursquareItem.cpp ) +set( FoursquarePlugin_LIBS Qt5::Script Qt5::Svg ) + marble_add_plugin( FoursquarePlugin ${my_SRCS} ) diff --git a/src/plugins/render/graticule/CMakeLists.txt b/src/plugins/render/graticule/CMakeLists.txt --- a/src/plugins/render/graticule/CMakeLists.txt +++ b/src/plugins/render/graticule/CMakeLists.txt @@ -9,5 +9,6 @@ set( graticule_UI GraticuleConfigWidget.ui ) qt_wrap_ui( graticule_SRCS ${graticule_UI} ) +set( GraticulePlugin_LIBS Qt5::Svg ) marble_add_plugin( GraticulePlugin ${graticule_SRCS} ) diff --git a/src/plugins/render/opencachingcom/CMakeLists.txt b/src/plugins/render/opencachingcom/CMakeLists.txt --- a/src/plugins/render/opencachingcom/CMakeLists.txt +++ b/src/plugins/render/opencachingcom/CMakeLists.txt @@ -17,5 +17,7 @@ qt_add_resources(my_SRCS opencachingcom.qrc) +set( OpenCachingComPlugin_LIBS Qt5::Script ) + MARBLE_ADD_PLUGIN( OpenCachingComPlugin ${my_SRCS} ) diff --git a/src/plugins/render/opendesktop/CMakeLists.txt b/src/plugins/render/opendesktop/CMakeLists.txt --- a/src/plugins/render/opendesktop/CMakeLists.txt +++ b/src/plugins/render/opendesktop/CMakeLists.txt @@ -14,4 +14,6 @@ set( opendesktop_UI OpenDesktopConfigWidget.ui ) qt_wrap_ui( my_SRCS ${opendesktop_UI} ) +set( OpenDesktopPlugin_LIBS Qt5::Script ) + marble_add_plugin( OpenDesktopPlugin ${my_SRCS} ) diff --git a/src/plugins/render/overviewmap/CMakeLists.txt b/src/plugins/render/overviewmap/CMakeLists.txt --- a/src/plugins/render/overviewmap/CMakeLists.txt +++ b/src/plugins/render/overviewmap/CMakeLists.txt @@ -9,4 +9,7 @@ set( overviewmap_UI OverviewMapConfigWidget.ui ) qt_wrap_ui(overviewmap_SRCS ${overviewmap_UI}) + +set( OverviewMap_LIBS Qt5::Svg ) + marble_add_plugin( OverviewMap ${overviewmap_SRCS} ) diff --git a/src/plugins/render/postalcode/CMakeLists.txt b/src/plugins/render/postalcode/CMakeLists.txt --- a/src/plugins/render/postalcode/CMakeLists.txt +++ b/src/plugins/render/postalcode/CMakeLists.txt @@ -12,4 +12,6 @@ PostalCodeItem.cpp PostalCodeItem.h ) +set( PostalCode_LIBS Qt5::Script ) + marble_add_plugin( PostalCode ${postalcode_SRCS} ) diff --git a/src/plugins/render/weather/CMakeLists.txt b/src/plugins/render/weather/CMakeLists.txt --- a/src/plugins/render/weather/CMakeLists.txt +++ b/src/plugins/render/weather/CMakeLists.txt @@ -25,4 +25,6 @@ qt_wrap_ui( weather_SRCS ${weather_UI} ) qt_add_resources( weather_SRCS weather.qrc ) +set( Weather_LIBS Qt5::Script Qt5::Svg ) + marble_add_plugin( Weather ${weather_SRCS} ) diff --git a/src/plugins/render/wikipedia/CMakeLists.txt b/src/plugins/render/wikipedia/CMakeLists.txt --- a/src/plugins/render/wikipedia/CMakeLists.txt +++ b/src/plugins/render/wikipedia/CMakeLists.txt @@ -13,4 +13,6 @@ qt_wrap_ui(wikipedia_SRCS ${wikipedia_UI}) +set( Wikipedia_LIBS Qt5::Svg ) + marble_add_plugin( Wikipedia ${wikipedia_SRCS} ) diff --git a/src/plugins/runner/gpx/CMakeLists.txt b/src/plugins/runner/gpx/CMakeLists.txt --- a/src/plugins/runner/gpx/CMakeLists.txt +++ b/src/plugins/runner/gpx/CMakeLists.txt @@ -42,7 +42,7 @@ set( TestTrack_SRCS TestTrack.moc ${TestTrack_SRCS} ) add_executable( TestTrack ${TestTrack_SRCS} ) - target_link_libraries( TestTrack ${Qt5Test_LIBRARIES} + target_link_libraries( TestTrack Qt5::Test ${MARBLEWIDGET} ) set_target_properties( TestTrack PROPERTIES COMPILE_FLAGS "-DDATA_PATH=\"\\\"${DATA_PATH}\\\"\" -DPLUGIN_PATH=\"\\\"${PLUGIN_PATH}\\\"\"" ) diff --git a/src/plugins/runner/json/CMakeLists.txt b/src/plugins/runner/json/CMakeLists.txt --- a/src/plugins/runner/json/CMakeLists.txt +++ b/src/plugins/runner/json/CMakeLists.txt @@ -7,4 +7,6 @@ set( json_SRCS JsonRunner.cpp JsonPlugin.cpp JsonParser.cpp ) +set( JsonPlugin_LIBS Qt5::Script ) + marble_add_plugin( JsonPlugin ${json_SRCS} ) diff --git a/src/plugins/runner/local-osm-search/CMakeLists.txt b/src/plugins/runner/local-osm-search/CMakeLists.txt --- a/src/plugins/runner/local-osm-search/CMakeLists.txt +++ b/src/plugins/runner/local-osm-search/CMakeLists.txt @@ -14,4 +14,4 @@ ) marble_add_plugin( LocalOsmSearchPlugin ${localOsmSearch_SRCS} ) -target_link_libraries( LocalOsmSearchPlugin ${Qt5Sql_LIBRARIES} ) +target_link_libraries( LocalOsmSearchPlugin Qt5::Sql ) diff --git a/src/plugins/runner/open-source-routing-machine/CMakeLists.txt b/src/plugins/runner/open-source-routing-machine/CMakeLists.txt --- a/src/plugins/runner/open-source-routing-machine/CMakeLists.txt +++ b/src/plugins/runner/open-source-routing-machine/CMakeLists.txt @@ -7,4 +7,6 @@ set( osrm_SRCS OSRMRunner.cpp OSRMPlugin.cpp ) +set( OSRMPlugin_LIBS Qt5::Script ) + marble_add_plugin( OSRMPlugin ${osrm_SRCS} ) diff --git a/tools/asc2kml/CMakeLists.txt b/tools/asc2kml/CMakeLists.txt --- a/tools/asc2kml/CMakeLists.txt +++ b/tools/asc2kml/CMakeLists.txt @@ -9,4 +9,4 @@ set( ${TARGET}_SRC asc2kml.cpp ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) +target_link_libraries( ${TARGET} Qt5::Core ) diff --git a/tools/constellations2kml/CMakeLists.txt b/tools/constellations2kml/CMakeLists.txt --- a/tools/constellations2kml/CMakeLists.txt +++ b/tools/constellations2kml/CMakeLists.txt @@ -10,4 +10,4 @@ add_definitions( -DMAKE_MARBLE_LIB ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} marblewidget-qt5 ) diff --git a/tools/dateline/CMakeLists.txt b/tools/dateline/CMakeLists.txt --- a/tools/dateline/CMakeLists.txt +++ b/tools/dateline/CMakeLists.txt @@ -10,4 +10,4 @@ add_definitions( -DMAKE_MARBLE_LIB ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} marblewidget-qt5 ) diff --git a/tools/dso2kml/CMakeLists.txt b/tools/dso2kml/CMakeLists.txt --- a/tools/dso2kml/CMakeLists.txt +++ b/tools/dso2kml/CMakeLists.txt @@ -9,4 +9,4 @@ set( ${TARGET}_SRC dso2kml.cpp ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) +target_link_libraries( ${TARGET} Qt5::Core ) diff --git a/tools/iau2kml/CMakeLists.txt b/tools/iau2kml/CMakeLists.txt --- a/tools/iau2kml/CMakeLists.txt +++ b/tools/iau2kml/CMakeLists.txt @@ -9,4 +9,4 @@ set( ${TARGET}_SRC iau2kml.cpp ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) +target_link_libraries( ${TARGET} Qt5::Core ) diff --git a/tools/kml2cache/CMakeLists.txt b/tools/kml2cache/CMakeLists.txt --- a/tools/kml2cache/CMakeLists.txt +++ b/tools/kml2cache/CMakeLists.txt @@ -9,4 +9,4 @@ set( ${TARGET}_SRC kml2cache.cpp ) add_definitions( -DMAKE_MARBLE_LIB ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} marblewidget-qt5 ) diff --git a/tools/kml2kml/CMakeLists.txt b/tools/kml2kml/CMakeLists.txt --- a/tools/kml2kml/CMakeLists.txt +++ b/tools/kml2kml/CMakeLists.txt @@ -10,4 +10,4 @@ add_definitions( -DMAKE_MARBLE_LIB ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} marblewidget-qt5 ) diff --git a/tools/mapreproject/CMakeLists.txt b/tools/mapreproject/CMakeLists.txt --- a/tools/mapreproject/CMakeLists.txt +++ b/tools/mapreproject/CMakeLists.txt @@ -23,4 +23,4 @@ add_definitions( -DMAKE_MARBLE_LIB ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} marblewidget-qt5 ) diff --git a/tools/maptheme-previewimage/CMakeLists.txt b/tools/maptheme-previewimage/CMakeLists.txt --- a/tools/maptheme-previewimage/CMakeLists.txt +++ b/tools/maptheme-previewimage/CMakeLists.txt @@ -11,4 +11,4 @@ add_definitions( -DMAKE_MARBLE_LIB ) add_executable( ${TARGET} ${${TARGET}_SRC} ${RESOURCES} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} marblewidget-qt5 ) diff --git a/tools/osm-addresses/CMakeLists.txt b/tools/osm-addresses/CMakeLists.txt --- a/tools/osm-addresses/CMakeLists.txt +++ b/tools/osm-addresses/CMakeLists.txt @@ -29,4 +29,4 @@ add_executable( ${TARGET} ${${TARGET}_SRC} ${PROTO_SRCS} ${PROTO_HDRS} ) target_link_libraries( ${TARGET} ${PROTOBUF_LIBRARIES} ${ZLIB_LIBRARIES} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ${Qt5Sql_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} Qt5::Sql marblewidget-qt5 ) diff --git a/tools/osm-sisyphus/CMakeLists.txt b/tools/osm-sisyphus/CMakeLists.txt --- a/tools/osm-sisyphus/CMakeLists.txt +++ b/tools/osm-sisyphus/CMakeLists.txt @@ -19,4 +19,4 @@ add_definitions( -DMAKE_MARBLE_LIB ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ${Qt5Sql_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} Qt5::Sql marblewidget-qt5 ) diff --git a/tools/pnt2svg/CMakeLists.txt b/tools/pnt2svg/CMakeLists.txt --- a/tools/pnt2svg/CMakeLists.txt +++ b/tools/pnt2svg/CMakeLists.txt @@ -9,4 +9,4 @@ set( ${TARGET}_SRC pnt2svg.cpp ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) +target_link_libraries( ${TARGET} Qt5::Core ) diff --git a/tools/pntdel/CMakeLists.txt b/tools/pntdel/CMakeLists.txt --- a/tools/pntdel/CMakeLists.txt +++ b/tools/pntdel/CMakeLists.txt @@ -9,4 +9,4 @@ set( ${TARGET}_SRC pntdel.cpp ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) +target_link_libraries( ${TARGET} Qt5::Core ) diff --git a/tools/pntreplace/CMakeLists.txt b/tools/pntreplace/CMakeLists.txt --- a/tools/pntreplace/CMakeLists.txt +++ b/tools/pntreplace/CMakeLists.txt @@ -9,4 +9,4 @@ set( ${TARGET}_SRC pntreplace.cpp svgxmlhandler.cpp ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5Widgets_LIBRARIES} ) +target_link_libraries( ${TARGET} Qt5::Xml Qt5::Widgets ) diff --git a/tools/poly2kml/CMakeLists.txt b/tools/poly2kml/CMakeLists.txt --- a/tools/poly2kml/CMakeLists.txt +++ b/tools/poly2kml/CMakeLists.txt @@ -10,4 +10,4 @@ add_definitions( -DMAKE_MARBLE_LIB ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} marblewidget-qt5 ) diff --git a/tools/routing-instructions/CMakeLists.txt b/tools/routing-instructions/CMakeLists.txt --- a/tools/routing-instructions/CMakeLists.txt +++ b/tools/routing-instructions/CMakeLists.txt @@ -16,4 +16,4 @@ add_definitions( -DMAKE_MARBLE_LIB ) add_executable( routing-instructions ${routing-instructions_SRC} ) -target_link_libraries( routing-instructions ${Qt5Core_LIBRARIES} ) +target_link_libraries( routing-instructions Qt5::Core ) diff --git a/tools/shp2pn2/CMakeLists.txt b/tools/shp2pn2/CMakeLists.txt --- a/tools/shp2pn2/CMakeLists.txt +++ b/tools/shp2pn2/CMakeLists.txt @@ -10,4 +10,4 @@ add_definitions( -DMAKE_MARBLE_LIB ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} marblewidget-qt5 ) diff --git a/tools/speaker-files/CMakeLists.txt b/tools/speaker-files/CMakeLists.txt --- a/tools/speaker-files/CMakeLists.txt +++ b/tools/speaker-files/CMakeLists.txt @@ -9,4 +9,4 @@ set( ${TARGET}_SRC main.cpp ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ${Qt5Sql_LIBRARIES} ) +target_link_libraries( ${TARGET} Qt5::Core Qt5::Sql ) diff --git a/tools/stars/CMakeLists.txt b/tools/stars/CMakeLists.txt --- a/tools/stars/CMakeLists.txt +++ b/tools/stars/CMakeLists.txt @@ -10,4 +10,4 @@ add_definitions( -D_USE_MATH_DEFINES=1 ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ) +target_link_libraries( ${TARGET} Qt5::Core ) diff --git a/tools/svg2pnt/CMakeLists.txt b/tools/svg2pnt/CMakeLists.txt --- a/tools/svg2pnt/CMakeLists.txt +++ b/tools/svg2pnt/CMakeLists.txt @@ -9,4 +9,4 @@ set( ${TARGET}_SRC svg2pnt.cpp svgxmlhandler.cpp ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} ${Qt5Xml_LIBRARIES} ) +target_link_libraries( ${TARGET} Qt5::Core Qt5::Xml ) diff --git a/tools/tilecreator-srtm2/CMakeLists.txt b/tools/tilecreator-srtm2/CMakeLists.txt --- a/tools/tilecreator-srtm2/CMakeLists.txt +++ b/tools/tilecreator-srtm2/CMakeLists.txt @@ -10,7 +10,7 @@ add_definitions( -DMAKE_MARBLE_LIB -DTILECREATOR ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} marblewidget-qt5 ) if (APPLE) target_link_libraries (${TARGET} ${APP_SERVICES_LIBRARY}) diff --git a/tools/tilecreator/CMakeLists.txt b/tools/tilecreator/CMakeLists.txt --- a/tools/tilecreator/CMakeLists.txt +++ b/tools/tilecreator/CMakeLists.txt @@ -10,4 +10,4 @@ add_definitions( -DMAKE_MARBLE_LIB ) add_executable( ${TARGET} ${${TARGET}_SRC} ) -target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} marblewidget-qt5 ) +target_link_libraries( ${TARGET} marblewidget-qt5 )