diff --git a/CMakeLists.txt b/CMakeLists.txt index 64b6aef..17082c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,9 +27,8 @@ include(UseBackportedModules) add_definitions(-DWIIUSE_COMPILE_LIB) if(NOT WIN32 AND NOT APPLE) - find_path(BLUEZ_INCLUDE_DIR - bluetooth/bluetooth.h) - include_directories("${BLUEZ_INCLUDE_DIR}") + find_package(Bluez REQUIRED) + include_directories("${BLUEZ_INCLUDE_DIRS}") endif() ### diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8b8a725..466eb81 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -35,7 +35,7 @@ add_library(wiiuse SHARED ${SOURCES} ${API}) if(WIN32) target_link_libraries(wiiuse Ws2_32.lib hid.lib setupapi.lib) else() - target_link_libraries(wiiuse m bluetooth) + target_link_libraries(wiiuse m ${BLUEZ_LIBRARIES}) endif() set_property(TARGET