From 00f4b7b66b43d77119f004b08471b72c4ce4bab5 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Tue, 26 May 2015 13:51:49 +0300 Subject: Cmake: add optional pkg-config for Grantlee Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3-70-g09d2