1 cmake_minimum_required(VERSION 2.6)
4 include(CheckSymbolExists)
5 CHECK_SYMBOL_EXISTS(bt_put_le16 "bluetooth/bluetooth.h" HAVE_BT_PUT_LE16)
7 ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
8 ${CMAKE_CURRENT_BINARY_DIR}/ble-config.h
10 include_directories(${CMAKE_CURRENT_BINARY_DIR})
12 include_directories("include")
15 DESTINATION "include/libble"
18 add_library(ble SHARED src/ble.c)
19 target_link_libraries(ble bluetooth)
22 LIBRARY DESTINATION lib
25 add_executable(ble-test main-bletest.c)
26 target_link_libraries(ble-test ble)
27 add_executable(rfcomm-test main-rfcomm.c)
28 target_link_libraries(rfcomm-test bluetooth)
30 TARGETS ble-test rfcomm-test
31 RUNTIME DESTINATION bin