Warning, /frameworks/kdelibs4support/cmake/modules/FindBlueZ.cmake is written in an unsupported language. File is not indexed.

0001 # - Try to find BlueZ
0002 # Once done this will define
0003 #
0004 #  BLUEZ_FOUND - system has BlueZ
0005 #  BLUEZ_INCLUDE_DIR - the BlueZ include directory
0006 #  BLUEZ_LIBRARIES - Link these to use BlueZ
0007 #  BLUEZ_DEFINITIONS - Compiler switches required for using BlueZ
0008 # Redistribution and use is allowed according to the terms of the BSD license.
0009 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0010 #
0011 
0012 # Copyright (c) 2008, Daniel Gollub, <dgollub@suse.de>
0013 #
0014 # Redistribution and use is allowed according to the terms of the BSD license.
0015 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0016 
0017 
0018 if ( BLUEZ_INCLUDE_DIR AND BLUEZ_LIBRARIES )
0019    # in cache already
0020    set(BlueZ_FIND_QUIETLY TRUE)
0021 endif ( BLUEZ_INCLUDE_DIR AND BLUEZ_LIBRARIES )
0022 
0023 # use pkg-config to get the directories and then use these values
0024 # in the FIND_PATH() and FIND_LIBRARY() calls
0025 if( NOT WIN32 )
0026   find_package(PkgConfig)
0027 
0028   pkg_check_modules(PC_BLUEZ QUIET bluez)
0029 
0030   set(BLUEZ_DEFINITIONS ${PC_BLUEZ_CFLAGS_OTHER})
0031 endif( NOT WIN32 )
0032 
0033 find_path(BLUEZ_INCLUDE_DIR NAMES bluetooth/bluetooth.h
0034   PATHS
0035   ${PC_BLUEZ_INCLUDEDIR}
0036   ${PC_BLUEZ_INCLUDE_DIRS}
0037   /usr/X11/include
0038 )
0039 
0040 find_library(BLUEZ_LIBRARIES NAMES bluetooth
0041   PATHS
0042   ${PC_BLUEZ_LIBDIR}
0043   ${PC_BLUEZ_LIBRARY_DIRS}
0044 )
0045 
0046 include(FindPackageHandleStandardArgs)
0047 find_package_handle_standard_args(BlueZ DEFAULT_MSG BLUEZ_INCLUDE_DIR BLUEZ_LIBRARIES )
0048 
0049 # show the BLUEZ_INCLUDE_DIR and BLUEZ_LIBRARIES variables only in the advanced view
0050 mark_as_advanced(BLUEZ_INCLUDE_DIR BLUEZ_LIBRARIES )
0051