aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/Modules/HandleFindGrantlee.cmake
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-11-17 18:23:32 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-16 07:59:36 -0800
commitf60e86b19c6d785a91bc126ac587bf9f3ee87369 (patch)
tree0e8386ba9e76e24e2c0bb9b2f39fb2ce9557ae14 /cmake/Modules/HandleFindGrantlee.cmake
parentcef86356f5e4b84c89305de3de9e614a62d18884 (diff)
downloadsubsurface-f60e86b19c6d785a91bc126ac587bf9f3ee87369.tar.gz
Move FTDI and Grantlee configuration out of CMakeLists.txt
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Diffstat (limited to 'cmake/Modules/HandleFindGrantlee.cmake')
-rw-r--r--cmake/Modules/HandleFindGrantlee.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmake/Modules/HandleFindGrantlee.cmake b/cmake/Modules/HandleFindGrantlee.cmake
new file mode 100644
index 000000000..0abb763df
--- /dev/null
+++ b/cmake/Modules/HandleFindGrantlee.cmake
@@ -0,0 +1,15 @@
+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()
+ set(PRINTING_PKG PrintSupport)
+ set(PRINTING_LIB Qt5::PrintSupport)
+endif()