mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
beb0d5703a
commit
8fdddf371b
1 changed files with 12 additions and 5 deletions
|
@ -480,12 +480,19 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|||
if(NOT NO_MARBLE)
|
||||
install(DIRECTORY marbledata/maps DESTINATION share/subsurface/data)
|
||||
install(DIRECTORY marbledata/bitmaps DESTINATION share/subsurface/data)
|
||||
else()
|
||||
# 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 ./geoservices &&
|
||||
mkdir -p geoservices &&
|
||||
ln -sf
|
||||
${CMAKE_SOURCE_DIR}/../install-root/usr/lib/qt/plugins/geoservices/libqtgeoservices_googlemaps.so ${CMAKE_BINARY_DIR}/geoservices)
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue