diff options
author | Laurent Montel <montel@kde.org> | 2007-09-17 06:16:43 +0000 |
---|---|---|
committer | Laurent Montel <montel@kde.org> | 2007-09-17 06:16:43 +0000 |
commit | 6b52e5f8926f8f0e6fa39360ecccf60241bb5c8f (patch) | |
tree | 01b51eb50408dbd2d87aca5f24e7bd3d57e01777 | |
parent | f41ba94fab116a39bd997f143b94b98a44e6096b (diff) | |
download | extra-cmake-modules-6b52e5f8926f8f0e6fa39360ecccf60241bb5c8f.tar.gz extra-cmake-modules-6b52e5f8926f8f0e6fa39360ecccf60241bb5c8f.tar.bz2 |
Use by kdegraphics and extragear/libs/libksane
svn path=/trunk/KDE/kdelibs/; revision=713339
-rw-r--r-- | modules/FindSane.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/FindSane.cmake b/modules/FindSane.cmake new file mode 100644 index 00000000..897b2fb2 --- /dev/null +++ b/modules/FindSane.cmake @@ -0,0 +1,28 @@ +# cmake macro to test if we use sane +# +# SANE_FOUND - system has SANE libs +# SANE_INCLUDE_DIR - the SANE include directory +# SANE_LIBRARIES - The libraries needed to use SANE + +# Copyright (c) 2006, Marcus Hufgard <hufgardm@hufgard.de> 2006 +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if (SANE_INCLUDE_DIR AND SANE_LIBRARY) + # Already in cache, be silent + set(Sane_FIND_QUIETLY TRUE) +endif (SANE_INCLUDE_DIR AND SANE_LIBRARY) + +FIND_PATH(SANE_INCLUDE_DIR sane/sane.h) + +FIND_LIBRARY(SANE_LIBRARY NAMES sane libsane + PATHS + /usr/lib/sane + /usr/local/lib/sane +) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sane DEFAULT_MSG SANE_INCLUDE_DIR SANE_LIBRARY ) + +MARK_AS_ADVANCED(SANE_INCLUDE_DIR SANE_LIBRARIES SANE_LIBRARY) |