diff options
author | Dirk Mueller <mueller@kde.org> | 2007-06-25 12:48:39 +0000 |
---|---|---|
committer | Dirk Mueller <mueller@kde.org> | 2007-06-25 12:48:39 +0000 |
commit | 07acb405620ec881bd2c8c137e86a417a40bf14b (patch) | |
tree | 587b1c511cb9bd4f38c616f28fe254a9020c6a85 /modules/FindBlueZ.cmake | |
parent | 06b456e025ac2b511a7587d4758f49ad489b5189 (diff) | |
download | extra-cmake-modules-07acb405620ec881bd2c8c137e86a417a40bf14b.tar.gz extra-cmake-modules-07acb405620ec881bd2c8c137e86a417a40bf14b.tar.bz2 |
needed outside kdebase/workspace, so move them to kdelibs
svn path=/trunk/KDE/kdelibs/; revision=680109
Diffstat (limited to 'modules/FindBlueZ.cmake')
-rw-r--r-- | modules/FindBlueZ.cmake | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/modules/FindBlueZ.cmake b/modules/FindBlueZ.cmake new file mode 100644 index 00000000..9435258e --- /dev/null +++ b/modules/FindBlueZ.cmake @@ -0,0 +1,47 @@ +# - Try to find BlueZ +# Once done this will define +# +# BLUEZ_FOUND - system has BlueZ + +# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> +# Copyright (c) 2007, Will Stephenson, <wstephenson@kde.org> +# Copyright (c) 2007, Daniel Gollub, <dgollub@suse.de> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + INCLUDE(UsePkgConfig) + PKGCONFIG(bluez _BlueZIncDir _BlueZLinkDir _BlueZLinkFlags _BlueZCflags) +ENDIF (NOT WIN32) + +find_path(BLUEZ_INCLUDE_DIR bluetooth/bluetooth.h + PATHS + ${_BlueZIncDir} + /usr/X11/include + ) + +find_library(BLUEZ_LIBRARIES NAMES bluetooth + PATHS + ${_BlueZLinkDir} + ) + +if (BLUEZ_LIBRARIES AND BLUEZ_INCLUDE_DIR) + set(BLUEZ_FOUND TRUE) +endif (BLUEZ_LIBRARIES AND BLUEZ_INCLUDE_DIR) + + +IF (BLUEZ_FOUND) + if (NOT BlueZ_FIND_QUIETLY) + message(STATUS "Found bluez: ${BLUEZ_LIBRARIES}") + endif (NOT BlueZ_FIND_QUIETLY) +ELSE(BLUEZ_FOUND) + IF (BlueZ_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find BlueZ") + ENDIF (BlueZ_FIND_REQUIRED) +ENDIF (BLUEZ_FOUND) + +mark_as_advanced( BLUEZ_LIBRARIES BLUEZ_INCLUDE_DIR) |