Skip to content

Commit

Permalink
fix finding bluetooth on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
hsattler committed Feb 11, 2009
1 parent 50214c5 commit 7b35b38
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CMakeModules/FindBluetooth.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
if ( PKG_CONFIG_FOUND )
pkg_check_modules ( PKGCONFIG_BLUEZ bluez )
endif ( PKG_CONFIG_FOUND )
find_path ( Bluetooth_INCLUDE_DIRS
NAMES
bluetooth/bluetooth.h
PATH_SUFFIXES
include
)
mark_as_advanced ( Bluetooth_INCLUDE_DIRS )

if ( PKGCONFIG_BLUEZ_FOUND )
foreach ( i ${PKGCONFIG_BLUEZ_LIBRARIES} )
find_library ( ${i}_LIBRARY
Expand All @@ -32,14 +40,6 @@ if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
add_definitions ( -DHAVE_SDPLIB )

else ( PKGCONFIG_BLUEZ_FOUND )
find_path ( Bluetooth_INCLUDE_DIRS
NAMES
bluetooth/bluetooth.h
PATH_SUFFIXES
include
)
mark_as_advanced ( Bluetooth_INCLUDE_DIRS )

find_library ( bluetooth_LIBRARY
NAMES
bluetooth
Expand Down

0 comments on commit 7b35b38

Please sign in to comment.