summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-07 12:37:22 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-08 12:19:39 -0700
commit7f896ee8d50152e85c6f40ff800c5ad8f9ba4124 (patch)
tree560d56def7f66b72f068b0d15c3b4290427977a6
parent2dd28e3c8d280f16fb073ac8b343ef5be2f0210b (diff)
downloadsubsurface-7f896ee8d50152e85c6f40ff800c5ad8f9ba4124.tar.gz
build-system: remove building Grantlee cmake
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--CMakeLists.txt15
-rw-r--r--cmake/Modules/HandleFindGrantlee.cmake19
-rw-r--r--desktop-widgets/CMakeLists.txt2
3 files changed, 9 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3bb4f040a..b1d61b557 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,7 +35,6 @@ option(SUBSURFACE_PROFILING_BUILD "enable profiling of Subsurface binary" OFF)
#Options regarding usage of pkgconfig
option(LIBGIT2_FROM_PKGCONFIG "use pkg-config to retrieve libgit2" OFF)
option(LIBDC_FROM_PKGCONFIG "use pkg-config to retrieve libdivecomputer" OFF)
-option(LIBGRANTLEE_FROM_PKGCONFIG "use pkg-config to retrieve grantlee" OFF)
#Library Handling
option(FORCE_LIBSSH "force linking with libssh to workaround libgit2 bug" ON)
@@ -135,7 +134,6 @@ include(pkgconfig_helper)
include(HandleFindGit2)
include(HandleFindLibDiveComputer)
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
- include(HandleFindGrantlee)
include(HandleUserManual)
endif()
include(HandleFtdiSupport)
@@ -177,6 +175,13 @@ if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
endif()
list(APPEND QT_EXTRA_COMPONENTS QuickWidgets)
remove_definitions(-DSUBSURFACE_MOBILE)
+ # I hate the double negation
+ if(NOT NO_PRINTING)
+ LIST(APPEND QT_EXTRA_COMPONENTS PrintSupport)
+ # Because Qt5WebKitWidgets isn't a part of the "regular" Qt5, we can't get it the normal way
+ find_package(Qt5WebKitWidgets REQUIRED)
+ set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} Qt5::WebKitWidgets)
+ endif()
elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(SUBSURFACE_TARGET Subsurface-mobile)
@@ -433,10 +438,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
install(FILES ${QTTRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations)
install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt DESTINATION ${RESOURCEDIR})
install(CODE "execute_process(COMMAND mkdir -p ${RESOURCEDIR}/qml)")
- # this is a HACK
- if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable" AND NOT NO_PRINTING)
- install(DIRECTORY ${Grantlee5_DIR}/../../grantlee DESTINATION ${PLUGINDIR})
- endif()
+
install(CODE "execute_process(COMMAND mkdir -p ${PLUGINDIR}/geoservices)")
install(CODE "execute_process(COMMAND cp ${_qt5Core_install_prefix}/plugins/geoservices/libqtgeoservices_googlemaps.dylib ${PLUGINDIR}/geoservices ERROR_QUIET)")
install(CODE "execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/../install-root/${_qt5Core_install_prefix}/plugins/geoservices/libqtgeoservices_googlemaps.dylib ${PLUGINDIR}/geoservices ERROR_QUIET)")
@@ -492,7 +494,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt ${CMAKE_SOURCE_DIR}/packaging/windows/subsurface.ico DESTINATION ${WINDOWSSTAGING})
install(TARGETS ${SUBSURFACE_TARGET} DESTINATION ${WINDOWSSTAGING})
install(FILES ${CMAKE_BINARY_DIR}/qt.conf DESTINATION ${WINDOWSSTAGING})
- install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/grantlee DESTINATION ${WINDOWSSTAGING})
if(NOT Qt5Core_VERSION VERSION_LESS 5.11.0)
# hack to work around the fact that we don't process the dependencies of plugins
diff --git a/cmake/Modules/HandleFindGrantlee.cmake b/cmake/Modules/HandleFindGrantlee.cmake
deleted file mode 100644
index becffd9a8..000000000
--- a/cmake/Modules/HandleFindGrantlee.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
-if(NO_PRINTING)
- message(STATUS "building without printing support")
- add_definitions(-DNO_PRINTING)
- set(GRANTLEE_LIBRARIES "")
-else()
- if(LIBGRANTLEE_FROM_PKGCONFIG)
- pkg_config_library(GRANTLEE libgrantlee REQUIRED)
- set(GRANTLEE_LIBRARIES "")
- else()
- find_package(Grantlee5 REQUIRED)
- set(GRANTLEE_LIBRARIES Grantlee5::Templates)
- endif()
- # Not really grantlee, but rather printing in general
- LIST(APPEND QT_EXTRA_COMPONENTS PrintSupport)
- # Because Qt5WebKitWidgets isn't a part of the "regular" Qt5, we can't get it the normal way
- #LIST(APPEND QT_EXTRA_COMPONENTS WebKitWidgets)
- find_package(Qt5WebKitWidgets REQUIRED)
- set(GRANTLEE_LIBRARIES ${GRANTLEE_LIBRARIES} Qt5::WebKitWidgets)
-endif()
diff --git a/desktop-widgets/CMakeLists.txt b/desktop-widgets/CMakeLists.txt
index 9531688d7..53ac30faa 100644
--- a/desktop-widgets/CMakeLists.txt
+++ b/desktop-widgets/CMakeLists.txt
@@ -182,4 +182,4 @@ target_link_libraries(subsurface_statistics ${QT_LIBRARIES})
add_library(subsurface_generated_ui STATIC ${SUBSURFACE_UI_HDRS})
target_link_libraries(subsurface_generated_ui ${QT_LIBRARIES})
add_library(subsurface_interface STATIC ${SUBSURFACE_INTERFACE} ${SUBSURFACE_UI_SRCS})
-target_link_libraries(subsurface_interface ${QT_LIBRARIES} ${GRANTLEE_LIBRARIES} subsurface_desktop_preferences)
+target_link_libraries(subsurface_interface ${QT_LIBRARIES} subsurface_desktop_preferences)