mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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
|
@ -481,11 +481,18 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
install(DIRECTORY marbledata/maps DESTINATION share/subsurface/data)
|
install(DIRECTORY marbledata/maps DESTINATION share/subsurface/data)
|
||||||
install(DIRECTORY marbledata/bitmaps DESTINATION share/subsurface/data)
|
install(DIRECTORY marbledata/bitmaps DESTINATION share/subsurface/data)
|
||||||
else()
|
else()
|
||||||
add_custom_target(link_googlemaps_plugin ALL COMMAND
|
# the syntax is odd, but this searches for libqtgeoservices_googlemaps.so
|
||||||
rm -rf ./geoservices &&
|
# in the filesystem below our install-root
|
||||||
mkdir -p geoservices &&
|
# different Linux flavors put the plugin in different directories
|
||||||
ln -sf
|
file(GLOB_RECURSE GOOGLEMAPS ${CMAKE_SOURCE_DIR}/../install-root/libqtgeoservices_googlemaps.so)
|
||||||
${CMAKE_SOURCE_DIR}/../install-root/usr/lib/qt/plugins/geoservices/libqtgeoservices_googlemaps.so ${CMAKE_BINARY_DIR}/geoservices)
|
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()
|
endif()
|
||||||
install(FILES subsurface.debug DESTINATION bin)
|
install(FILES subsurface.debug DESTINATION bin)
|
||||||
install(FILES subsurface.desktop DESTINATION share/applications)
|
install(FILES subsurface.desktop DESTINATION share/applications)
|
||||||
|
|
Loading…
Add table
Reference in a new issue