mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 18:46:16 +00:00
build-system: remove building Grantlee cmake
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2dd28e3c8d
commit
7f896ee8d5
3 changed files with 9 additions and 27 deletions
|
@ -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
|
||||
|
|
|
@ -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()
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue