From 9bc0d2cd9d38750658770e69bf0445dc5162beb7 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 10 Aug 2012 16:51:25 -0500 Subject: Update to new CUPS 1.6 API --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 113c618c1..ceaa5eb6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -693,6 +693,19 @@ if( WITH_CUPS ) set( HAVE_CUPS 1 ) # FIXME if CUPS is at least 1.1.20, doesn't have password caching set( HAVE_CUPS_NO_PWD_CACHE 1 ) + + # save CMAKE_REQUIRED_LIBRARIES + set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ) + set( CMAKE_REQUIRED_LIBRARIES ${CUPS_LIBRARIES} ) + check_c_source_compiles(" + #include + #include + #include + int main(int argc, char *argv[]) { ipp_attribute_t *attr = 0; ippGetName(attr); return 0; } " + HAVE_CUPS_1_6 ) + # restore CMAKE_REQUIRED_LIBRARIES + set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} ) + unset( bak_CMAKE_REQUIRED_LIBRARIES ) endif( WITH_CUPS ) -- cgit v1.2.1