mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Printing: Change "NEW_PRINTING" to "NO_PRINTING"
If NO_PRINTING is not set, subsurface will require grantlee during building. As Grantlee will be a hard dependency for Subsurface, so no Grantlee means no printing. [Dirk Hohndel: switched default for NO_PRINTING to ON] Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6de5cfb7a4
commit
0307ae98c2
1 changed files with 13 additions and 4 deletions
|
@ -13,6 +13,7 @@ option(LIBGRANTLEE_FROM_PKGCONFIG "use pkg-config to retrieve grantlee" OFF)
|
||||||
option(NO_MARBLE "disable the marble widget" OFF)
|
option(NO_MARBLE "disable the marble widget" OFF)
|
||||||
option(NO_TESTS "disable the tests" OFF)
|
option(NO_TESTS "disable the tests" OFF)
|
||||||
option(NO_DOCS "disable the docs" OFF)
|
option(NO_DOCS "disable the docs" OFF)
|
||||||
|
option(NO_PRINTING "disable the printing support" ON)
|
||||||
option(USE_LIBGIT23_API "allow building with libgit2 master" OFF)
|
option(USE_LIBGIT23_API "allow building with libgit2 master" OFF)
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH
|
set(CMAKE_MODULE_PATH
|
||||||
|
@ -94,7 +95,7 @@ endif()
|
||||||
|
|
||||||
# setup Grantlee
|
# setup Grantlee
|
||||||
|
|
||||||
if(NEW_PRINTING)
|
if(NOT NO_PRINTING)
|
||||||
if(LIBGRANTLEE_FROM_PKGCONFIG)
|
if(LIBGRANTLEE_FROM_PKGCONFIG)
|
||||||
pkg_config_library(GRANTLEE libgrantlee REQUIRED)
|
pkg_config_library(GRANTLEE libgrantlee REQUIRED)
|
||||||
set(GRANTLEE_LIBRARIES "")
|
set(GRANTLEE_LIBRARIES "")
|
||||||
|
@ -102,7 +103,16 @@ if(NEW_PRINTING)
|
||||||
find_package(Grantlee5)
|
find_package(Grantlee5)
|
||||||
set(GRANTLEE_LIBRARIES Grantlee5::Templates)
|
set(GRANTLEE_LIBRARIES Grantlee5::Templates)
|
||||||
endif()
|
endif()
|
||||||
add_definitions(-DNEW_PRINTING)
|
set(SUBSURFACE_PRINTING_SRCS
|
||||||
|
printer.cpp
|
||||||
|
templatelayout.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NO_PRINTING)
|
||||||
|
message(STATUS "building without printing support")
|
||||||
|
add_definitions(-DNO_PRINTING)
|
||||||
|
set(GRANTLEE_LIBRARIES "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${GRANTLEE_LIBRARIES} -lusb-1.0)
|
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${GRANTLEE_LIBRARIES} -lusb-1.0)
|
||||||
|
@ -260,8 +270,7 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
||||||
configuredivecomputer.cpp
|
configuredivecomputer.cpp
|
||||||
configuredivecomputerthreads.cpp
|
configuredivecomputerthreads.cpp
|
||||||
divesitehelpers.cpp
|
divesitehelpers.cpp
|
||||||
templatelayout.cpp
|
${SUBSURFACE_PRINTING_SRCS}
|
||||||
printer.cpp
|
|
||||||
${PLATFORM_SRC}
|
${PLATFORM_SRC}
|
||||||
)
|
)
|
||||||
source_group("Subsurface Core" FILES ${SUBSURFACE_CORE_LIB_SRCS})
|
source_group("Subsurface Core" FILES ${SUBSURFACE_CORE_LIB_SRCS})
|
||||||
|
|
Loading…
Reference in a new issue