diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-08-26 11:12:29 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-08-26 11:52:58 -0700 |
commit | 8fdddf371b5938810b25f9781f82fc75f22107b8 (patch) | |
tree | 7246f71d0256226179792e38dd03af245c375d88 | |
parent | beb0d5703a0e5be62bde83ceffa8c0e36df0d7bd (diff) | |
download | subsurface-8fdddf371b5938810b25f9781f82fc75f22107b8.tar.gz |
cmake: try to find the Googlemaps plugin on Linux
Different flavors of Linux put this in different subdirectories. Just
have cmake find the plugin for us.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bd36966c0..e77481064 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -481,11 +481,18 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") install(DIRECTORY marbledata/maps DESTINATION share/subsurface/data) install(DIRECTORY marbledata/bitmaps DESTINATION share/subsurface/data) else() - add_custom_target(link_googlemaps_plugin ALL COMMAND - rm -rf ./geoservices && - mkdir -p geoservices && - ln -sf - ${CMAKE_SOURCE_DIR}/../install-root/usr/lib/qt/plugins/geoservices/libqtgeoservices_googlemaps.so ${CMAKE_BINARY_DIR}/geoservices) + # the syntax is odd, but this searches for libqtgeoservices_googlemaps.so + # in the filesystem below our install-root + # different Linux flavors put the plugin in different directories + file(GLOB_RECURSE GOOGLEMAPS ${CMAKE_SOURCE_DIR}/../install-root/libqtgeoservices_googlemaps.so) + if ("${GOOGLEMAPS}" STREQUAL "") + message(STATUS "Cannot find libqtgeoservices_googlemaps.so") + else() + add_custom_target(link_googlemaps_plugin ALL COMMAND + rm -rf ${CMAKE_BINARY_DIR}/geoservices && + mkdir -p ${CMAKE_BINARY_DIR}/geoservices && + ln -sf ${GOOGLEMAPS} ${CMAKE_BINARY_DIR}/geoservices) + endif() endif() install(FILES subsurface.debug DESTINATION bin) install(FILES subsurface.desktop DESTINATION share/applications) |