Use Qt5::* notation with target_link_libraries, & PUBLIC/PRIVATE interfaces

Summary:
Qt5::* notation is the usual way to refer to the imported cmake targets
representing the Qt5 modules/libs.

PUBLIC & PRIVATE link interfaces help to speed up compilation & linking,
because libs listed in PRIVATE will stay implementation detail of the lib
and not result in consumers of the lib also having those libs in the link
list. And it also reduces the amount of includes used, so less dirs to
search headers in.
To allow SailfishOS 2.0 builds, which has older cmake, still use
LINK_PUBLIC/LINK_PRIVATE for now

Reviewers: rahn, nienhueser

Reviewed By: nienhueser

Differential Revision: https://phabricator.kde.org/D1438
parent d1a46d87
......@@ -95,14 +95,6 @@ endif()
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
......
......@@ -85,8 +85,7 @@ macro( marble_add_test TEST_NAME )
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}\\\"\"" )
......
......@@ -9,7 +9,7 @@ include_directories(
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)
......
......@@ -10,6 +10,5 @@ set( ${TARGET}_SRC main.cpp)
add_executable( ${TARGET} ${${TARGET}_SRC} )
target_link_libraries( ${TARGET} ${OpenCV_LIBS} ${MARBLEWIDGET} )
target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} )
install( TARGETS ${TARGET} RUNTIME DESTINATION bin )
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC main.cpp)
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} )
......
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC main.cpp)
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} )
......
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC main.cpp)
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} )
......
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC main.cpp)
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} )
......
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC main.cpp)
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} )
......
......@@ -10,6 +10,5 @@ set( ${TARGET}_SRC main.cpp)
add_executable( ${TARGET} ${${TARGET}_SRC} )
target_link_libraries( ${TARGET} ${MARBLEWIDGET} )
target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} )
install( TARGETS ${TARGET} RUNTIME DESTINATION bin )
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC main.cpp)
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} )
......
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC main.cpp)
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} )
......
......@@ -27,8 +27,6 @@ target_link_libraries(
${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 )
......
......@@ -12,7 +12,6 @@ qt5_add_resources(marble_QRCS marbleQuick2.qrc)
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
......
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC main.cpp)
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} )
......
......@@ -10,6 +10,5 @@ set( ${TARGET}_SRC main.cpp)
add_executable( ${TARGET} ${${TARGET}_SRC} )
target_link_libraries( ${TARGET} ${MARBLEWIDGET} )
target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} )
install( TARGETS ${TARGET} RUNTIME DESTINATION bin )
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC main.cpp)
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} )
......
......@@ -10,6 +10,5 @@ set( ${TARGET}_SRC main.cpp)
add_executable( ${TARGET} ${${TARGET}_SRC} )
target_link_libraries( ${TARGET} ${MARBLEWIDGET} )
target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} )
install( TARGETS ${TARGET} RUNTIME DESTINATION bin )
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC main.cpp)
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} )
......
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC squad-interpolation.cpp)
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} )
......@@ -10,6 +10,5 @@ set( ${TARGET}_SRC tour-preview.cpp)
add_executable( ${TARGET} ${${TARGET}_SRC} )
target_link_libraries( ${TARGET} ${OpenCV_LIBS} ${MARBLEWIDGET} )
target_link_libraries( ${TARGET} ${Qt5Core_LIBRARIES} )
install( TARGETS ${TARGET} RUNTIME DESTINATION bin )
......@@ -10,7 +10,6 @@ set( ${TARGET}_SRC vehicletracking.cpp)
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} )
......@@ -7,31 +7,36 @@ if (CMAKE_SYSTEM_NAME STREQUAL Android)
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)
......
......@@ -7,31 +7,36 @@ if (CMAKE_SYSTEM_NAME STREQUAL Android)
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)
......
......@@ -25,13 +25,11 @@ endif (WIN32)
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)
......
......@@ -16,11 +16,9 @@ qt_add_resources(my_SRCS meego.qrc)
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
)
......@@ -11,28 +11,34 @@ qt_wrap_ui(marble_SRCS ${marble_UI})
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)
......@@ -36,7 +36,6 @@ set(GENERIC_LIB_VERSION "0.24.21")
set(GENERIC_LIB_SOVERSION "25")
endif()
# link_directories (${QT_LIBRARY_DIR})
########### next target ###############
if(MARBLE_NO_WEBKITWIDGETS)
......@@ -356,38 +355,55 @@ qt_wrap_ui(marblewidget_SRCS ${marblewidget_UI})
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)
......
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 @@ set_target_properties(marbledeclarative PROPERTIES
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
......
......@@ -9,6 +9,6 @@ SET( qtpositioning_SRCS
QtPositioningPositionProviderPlugin.cpp
)
SET( QtPositioningPositionProviderPlugin_LIBS ${Qt5Location_LIBRARIES} ${Qt5Positioning_LIBRARIES} )
SET( QtPositioningPositionProviderPlugin_LIBS Qt5::Location Qt5::Positioning )
MARBLE_ADD_PLUGIN( QtPositioningPositionProviderPlugin ${qtpositioning_SRCS} )
......@@ -10,4 +10,6 @@ set( compass_UI CompassConfigWidget.ui )
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} )
......@@ -10,5 +10,6 @@ set( crosshairs_UI CrosshairsConfigWidget.ui )
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} )
......@@ -15,4 +15,6 @@ set( earthquake_UI EarthquakeConfigWidget.ui )
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} )
......@@ -11,5 +11,7 @@ set( my_SRCS
FoursquareItem.cpp
)
set( FoursquarePlugin_LIBS Qt5::Script Qt5::Svg )
marble_add_plugin( FoursquarePlugin ${my_SRCS} )
......@@ -9,5 +9,6 @@ set( graticule_SRCS GraticulePlugin.cpp )
set( graticule_UI GraticuleConfigWidget.ui )
qt_wrap_ui( graticule_SRCS ${graticule_UI} )
set( GraticulePlugin_LIBS Qt5::Svg )
marble_add_plugin( GraticulePlugin ${graticule_SRCS} )
......@@ -17,5 +17,7 @@ QT_WRAP_UI(my_SRCS ${cachedetailsdialog_UI})
qt_add_resources(my_SRCS opencachingcom.qrc)
set( OpenCachingComPlugin_LIBS Qt5::Script )
MARBLE_ADD_PLUGIN( OpenCachingComPlugin ${my_SRCS} )
......@@ -14,4 +14,6 @@ set( my_SRCS
set( opendesktop_UI OpenDesktopConfigWidget.ui )
qt_wrap_ui( my_SRCS ${opendesktop_UI} )
set( OpenDesktopPlugin_LIBS Qt5::Script )
marble_add_plugin( OpenDesktopPlugin ${my_SRCS} )
......@@ -9,4 +9,7 @@ set( overviewmap_SRCS OverviewMap.cpp )
set( overviewmap_UI OverviewMapConfigWidget.ui )
qt_wrap_ui(overviewmap_SRCS ${overviewmap_UI})
set( OverviewMap_LIBS Qt5::Svg )
marble_add_plugin( OverviewMap ${overviewmap_SRCS} )
......@@ -12,4 +12,6 @@ set( postalcode_SRCS PostalCodePlugin.cpp
PostalCodeItem.cpp
PostalCodeItem.h )
set( PostalCode_LIBS Qt5::Script )
marble_add_plugin( PostalCode ${postalcode_SRCS} )
......@@ -25,4 +25,6 @@ set( weather_UI WeatherConfigWidget.ui )
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} )
......@@ -13,4 +13,6 @@ set( wikipedia_UI WikipediaConfigWidget.ui )
qt_wrap_ui(wikipedia_SRCS ${wikipedia_UI})
set( Wikipedia_LIBS Qt5::Svg )
marble_add_plugin( Wikipedia ${wikipedia_SRCS} )
......@@ -42,7 +42,7 @@ if( BUILD_MARBLE_TESTS )
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}\\\"\"" )
......
......@@ -7,4 +7,6 @@ INCLUDE_DIRECTORIES(
set( json_SRCS JsonRunner.cpp JsonPlugin.cpp JsonParser.cpp )
set( JsonPlugin_LIBS Qt5::Script )