summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-05-26 13:51:49 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-04 10:07:18 -0700
commit00f4b7b66b43d77119f004b08471b72c4ce4bab5 (patch)
tree03889c4f4cf1c44294b6ff962895ada10ee8f87b /CMakeLists.txt
parentbe7f8dde7117753e110ba34b25c495ee8f74af25 (diff)
downloadsubsurface-00f4b7b66b43d77119f004b08471b72c4ce4bab5.tar.gz
Cmake: add optional pkg-config for Grantlee
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 953e0fcde..f69176fe7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
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)
option(NO_MARBLE "disable the marble widget" OFF)
option(NO_TESTS "disable the tests" OFF)
option(NO_DOCS "disable the docs" OFF)
@@ -93,8 +94,16 @@ endif()
# setup Grantlee
-find_package(Grantlee5)
-set(GRANTLEE_LIBRARIES Grantlee5::Templates)
+if(NEW_PRINTING)
+ if(LIBGRANTLEE_FROM_PKGCONFIG)
+ pkg_config_library(GRANTLEE libgrantlee REQUIRED)
+ set(GRANTLEE_LIBRARIES "")
+ else()
+ find_package(Grantlee5)
+ set(GRANTLEE_LIBRARIES Grantlee5::Templates)
+ endif()
+ add_definitions(-DNEW_PRINTING)
+endif()
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${GRANTLEE_LIBRARIES} -lusb-1.0)