summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-09-18 20:55:21 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-09-18 20:55:21 (GMT)
commit18ab26fb9474178ea330fcb43c2cc0801971786e (patch)
tree9fdb458a49b40b663536bf38ecc00ff87d5904a6
parent180805657176a8b30d6be421b720722d90e27b64 (diff)
Find Marble by its CMake Config files
Also remove Marble from public link interface of KF5KGeoMap, not exposed
-rw-r--r--CMakeLists.txt5
-rw-r--r--cmake/modules/FindMarble.cmake21
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/backends/CMakeLists.txt2
4 files changed, 5 insertions, 26 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9dd0959..8b87488 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,7 +74,7 @@ find_package(KF5 ${KF5_VERSION} REQUIRED COMPONENTS
KIO
)
-find_package(Marble REQUIRED)
+find_package(Marble CONFIG REQUIRED)
ecm_setup_version(${LIBKGEOMAP_LIB_VERSION}
VARIABLE_PREFIX KGEOMAP
@@ -90,8 +90,7 @@ add_definitions(-DQT_USE_QSTRINGBUILDER -DQT_USE_FAST_OPERATOR_PLUS)
include_directories(${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${MARBLE_INCLUDE_DIR})
+ ${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(data)
add_subdirectory(src)
diff --git a/cmake/modules/FindMarble.cmake b/cmake/modules/FindMarble.cmake
deleted file mode 100644
index f0370b9..0000000
--- a/cmake/modules/FindMarble.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-# - Try to find the Marble Library
-# Once done this will define
-#
-# MARBLE_FOUND - system has Marble
-# MARBLE_INCLUDE_DIR - the Marble include directory
-# MARBLE_LIBRARIES
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
-
-IF ( MARBLE_INCLUDE_DIR AND MARBLE_LIBRARIES )
- # in cache already
- SET( MARBLE_FIND_QUIETLY TRUE )
-ENDIF ( MARBLE_INCLUDE_DIR AND MARBLE_LIBRARIES )
-
-FIND_PATH( MARBLE_INCLUDE_DIR NAMES marble/MarbleModel.h )
-FIND_LIBRARY( MARBLE_LIBRARIES NAMES marblewidget-qt5 )
-FIND_LIBRARY( ASTRO_LIBRARIES NAMES astro )
-
-INCLUDE( FindPackageHandleStandardArgs )
-FIND_PACKAGE_HANDLE_STANDARD_ARGS( marble DEFAULT_MSG MARBLE_INCLUDE_DIR MARBLE_LIBRARIES ASTRO_LIBRARIES)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d3cf7c4..ea5159e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -70,14 +70,13 @@ target_include_directories(KF5KGeoMap PUBLIC "$<BUILD_INTERFACE:${libkgeomap_SOU
target_link_libraries(KF5KGeoMap
PUBLIC
- ${MARBLE_LIBRARIES}
-
Qt5::Core
Qt5::Gui
Qt5::Xml
Qt5::Widgets
PRIVATE
mapbackends
+ Marble
KF5::I18n
KF5::ConfigCore
diff --git a/src/backends/CMakeLists.txt b/src/backends/CMakeLists.txt
index 8acec7b..d385d88 100644
--- a/src/backends/CMakeLists.txt
+++ b/src/backends/CMakeLists.txt
@@ -22,6 +22,8 @@ add_library(mapbackends STATIC
)
target_link_libraries(mapbackends
+ PUBLIC
+ Marble
PRIVATE
KF5::ConfigCore
KF5::I18n