summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-10 16:51:25 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-10 16:51:25 -0500
commit9bc0d2cd9d38750658770e69bf0445dc5162beb7 (patch)
tree64d13ba540404b0dc3a05d3dccc68006ab42c4b0 /CMakeLists.txt
parent6f181849bb63876ad03f8fa156b9fd5310bc9d29 (diff)
downloadtdelibs-9bc0d2cd9d38750658770e69bf0445dc5162beb7.tar.gz
tdelibs-9bc0d2cd9d38750658770e69bf0445dc5162beb7.zip
Update to new CUPS 1.6 API
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
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 <cups/cups.h>
+ #include <cups/ipp.h>
+ #include <cups/language.h>
+ 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 )