diff options
-rw-r--r-- | CMakeLists.txt | 23 | ||||
-rw-r--r-- | cmake/Modules/HandleFindMarble.cmake | 20 |
2 files changed, 21 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d28678345..2c785bcde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,7 @@ include(cmake/Modules/pkgconfig_helper.cmake) # module file. include(cmake/Modules/HandleFindGit2.cmake) include(cmake/Modules/HandleFindLibDiveComputer.cmake) - +include(cmake/Modules/HandleFindMarble.cmake) pkg_config_library(LIBXML libxml-2.0 REQUIRED) pkg_config_library(LIBSQLITE3 sqlite3 REQUIRED) pkg_config_library(LIBXSLT libxslt REQUIRED) @@ -100,26 +100,6 @@ if(SMARTTRAK_IMPORT) pkg_config_library(LIBMDB libmdb REQUIRED) endif() -# 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() -else() - message(STATUS "building without marble widget support") - add_definitions(-DNO_MARBLE) - set(MARBLE_LIBRARIES "") -endif() - if(FTDISUPPORT) message(STATUS "building with libftdi support") pkg_config_library(LIBFTDI libftdi QUIET) @@ -156,7 +136,6 @@ else() endif() set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBUSB_LIBRARIES}) -add_custom_target(link_marble_data ALL COMMAND rm -rf ./marbledata && ln -s ${CMAKE_SOURCE_DIR}/marbledata ${CMAKE_BINARY_DIR}/marbledata) # configure Qt. if(SUBSURFACE_MOBILE) 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 |