Move FTDI and Grantlee configuration out of CMakeLists.txt

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
This commit is contained in:
Tomaz Canabrava 2015-11-17 18:23:32 -02:00 committed by Dirk Hohndel
parent cef86356f5
commit f60e86b19c
4 changed files with 30 additions and 25 deletions

View file

@ -36,3 +36,4 @@ SET(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -lssl -lcrypto)
INCLUDE( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( git2 DEFAULT_MSG LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES )
include_directories(${LIBGIT2_INCLUDE_DIR}})

View file

@ -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()

View file

@ -0,0 +1,8 @@
if(FTDISUPPORT)
message(STATUS "building with libftdi support")
pkg_config_library(LIBFTDI libftdi QUIET)
if (NOT LIBFTDI_FOUND)
pkg_config_library(LIBFTDI libftdi1 REQUIRED)
endif()
add_definitions(-DSERIAL_FTDI)
endif()