aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan de Groot <groot@kde.org>2007-08-14 21:30:58 +0000
committerAdriaan de Groot <groot@kde.org>2007-08-14 21:30:58 +0000
commit3131bf6a9c9860678609fcbb664ff6be3fe1bc87 (patch)
tree27723fd24602cfc723701e7a93972a4bd51d4248
parentd1058df393549b8c388f3960b8253b56bcc05f1e (diff)
downloadextra-cmake-modules-3131bf6a9c9860678609fcbb664ff6be3fe1bc87.tar.gz
extra-cmake-modules-3131bf6a9c9860678609fcbb664ff6be3fe1bc87.tar.bz2
On FreeBSD, CUPS lives in /usr/local/lib which needs to be added to the link path; use the technique from FindX11 to get the dir of the library and pass that on to check_library_exists. Fixes CUPS detection on FreeBSD.
CCMAIL: neundorf@kde.org CCMAIL: kde@freebsd.org svn path=/trunk/KDE/kdelibs/; revision=700122
-rw-r--r--modules/FindCups.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/FindCups.cmake b/modules/FindCups.cmake
index 92c958d9..f1e8b21c 100644
--- a/modules/FindCups.cmake
+++ b/modules/FindCups.cmake
@@ -23,15 +23,16 @@ FIND_LIBRARY(CUPS_LIBRARIES NAMES cups )
IF (CUPS_INCLUDE_DIR AND CUPS_LIBRARIES)
SET(CUPS_FOUND TRUE)
+ GET_FILENAME_COMPONENT(CUPS_LIBRARY_DIR ${CUPS_LIBRARIES} PATH)
# ippDeleteAttribute is new in cups-1.1.19 (and used by kdeprint)
- CHECK_LIBRARY_EXISTS(cups ippDeleteAttribute "" CUPS_HAS_IPP_DELETE_ATTRIBUTE)
+ CHECK_LIBRARY_EXISTS(cups ippDeleteAttribute ${CUPS_LIBRARY_DIR} CUPS_HAS_IPP_DELETE_ATTRIBUTE)
IF (CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE AND NOT CUPS_HAS_IPP_DELETE_ATTRIBUTE)
SET(CUPS_FOUND FALSE)
ENDIF (CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE AND NOT CUPS_HAS_IPP_DELETE_ATTRIBUTE)
# cupsDoAuthentication is new in cups-1.1.20 (and used by kdeprint)
- CHECK_LIBRARY_EXISTS(cups cupsDoAuthentication "" CUPS_HAS_CUPS_DO_AUTHENTICATION)
+ CHECK_LIBRARY_EXISTS(cups cupsDoAuthentication ${CUPS_LIBRARY_DIR} CUPS_HAS_CUPS_DO_AUTHENTICATION)
IF (CUPS_REQUIRE_CUPS_DO_AUTHENTICATION AND NOT CUPS_HAS_CUPS_DO_AUTHENTICATION)
SET(CUPS_FOUND FALSE)
ENDIF (CUPS_REQUIRE_CUPS_DO_AUTHENTICATION AND NOT CUPS_HAS_CUPS_DO_AUTHENTICATION)