summaryrefslogtreecommitdiffstats
path: root/cmake/Modules
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-11-17 18:04:14 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-16 07:59:01 -0800
commitcef86356f5e4b84c89305de3de9e614a62d18884 (patch)
tree8d04b7a97d592667fc0bf85bd990e891bc80521c /cmake/Modules
parent126d9a00e41607fc4c1eb20edcbe17529c09ef38 (diff)
downloadsubsurface-cef86356f5e4b84c89305de3de9e614a62d18884.tar.gz
Add HandleFindMarble.cmake
Marble stuff should be inside handleMarble file, this clears the Main CMakelists.txt file. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/HandleFindMarble.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/cmake/Modules/HandleFindMarble.cmake b/cmake/Modules/HandleFindMarble.cmake
new file mode 100644
index 000000000..40903e6a9
--- /dev/null
+++ b/cmake/Modules/HandleFindMarble.cmake
@@ -0,0 +1,20 @@
+# setup marble
+
+if(NOT NO_MARBLE)
+ if(LIBMARBLE_FROM_PKGCONFIG)
+ pkg_config_library(MARBLE libmarble REQUIRED)
+ set(MARBLE_LIBRARIES "")
+ else()
+ find_package(MARBLE QUIET)
+ if(MARBLE_FOUND)
+ include_directories(${MARBLE_INCLUDE_DIR})
+ else()
+ set(NO_MARBLE ON)
+ endif()
+ endif()
+ add_custom_target(link_marble_data ALL COMMAND rm -rf ./marbledata && ln -s ${CMAKE_SOURCE_DIR}/marbledata ${CMAKE_BINARY_DIR}/marbledata)
+else()
+ message(STATUS "building without marble widget support")
+ add_definitions(-DNO_MARBLE)
+ set(MARBLE_LIBRARIES "")
+endif() \ No newline at end of file