Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/wiimote/cmake/tools/FindBluetooth.cmake @ 9827

Last change on this file since 9827 was 9827, checked in by smerkli, 10 years ago

Tried a few fixes to get Bluetooth to be included
properly, but no success so far. Will have to ask someone
who knows more about our CMake setup for this.

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1IF(LINUX)
2        #FIND_PATH(BLUETOOTH_INCLUDE_DIR NAMES bluetooth PATHS /usr/include/bluetooth/ /usr/local/include/bluetooth /home/georgr/libbluetooth-dev/libbluetooth-dev/usr/include/bluetooth)
3        #FIND_LIBRARY(BLUETOOTH_LIBRARY NAMES bluetooth PATHS  /usr/lib/ /usr/lib/x86_64-linux-gnu /home/georgr/libbluetooth-dev/libbluetooth-dev/usr/lib/x86_64-linux-gnu)
4        FIND_PATH(BLUETOOTH_INCLUDE_DIR bluetooth /home/georgr/libbluetooth-dev/libbluetooth-dev/usr/include/)
5        FIND_LIBRARY(BLUETOOTH_LIBRARY NAMES bluetooth PATHS  /home/georgr/libbluetooth-dev/libbluetooth-dev/usr/lib/x86_64-linux-gnu/) 
6        MESSAGE(STATUS "Bluetooth library test: ${BLUETOOTH_LIBRARY}")
7        MESSAGE(STATUS "Bluetooth header test: ${BLUETOOTH_INCLUDE_DIR}")
8        IF(BLUETOOTH_INCLUDE_DIR AND BLUETOOTH_LIBRARY)
9                SET(BLUETOOTH_FOUND TRUE)
10        ENDIF(BLUETOOTH_INCLUDE_DIR AND BLUETOOTH_LIBRARY)
11ENDIF(LINUX)
12
13IF(APPLE)
14        SET(BLUETOOTH_LIBRARY "-framework IOBluetooth")
15        SET(BLUETOOTH_FOUND TRUE)
16ENDIF(APPLE)
17
18IF (BLUETOOTH_FOUND)
19   IF (NOT Bluetooth_FIND_QUIETLY)
20      MESSAGE(STATUS "Found Bluetooth: ${BLUETOOTH_LIBRARY}")
21   ENDIF (NOT Bluetooth_FIND_QUIETLY)
22ELSE (BLUETOOTH_FOUND)
23   IF (Bluetooth_FIND_REQUIRED)
24      MESSAGE(FATAL_ERROR "Could not find Bluetooth. Please install Bluetooth package")
25   ENDIF (Bluetooth_FIND_REQUIRED)
26ENDIF (BLUETOOTH_FOUND)
Note: See TracBrowser for help on using the repository browser.