forked from edrosten/libblepp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
52 lines (43 loc) · 1.21 KB
/
CMakeLists.txt
File metadata and controls
52 lines (43 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.4)
project(ble++)
set(HEADERS
blepp/bledevice.h
blepp/logging.h
blepp/float.h
blepp/uuid.h
blepp/pretty_printers.h
blepp/gap.h
blepp/lescan.h
blepp/xtoa.h
blepp/att.h
blepp/blestatemachine.h
blepp/att_pdu.h)
set(SRC
src/att_pdu.cc
src/float.cc
src/logging.cc
src/uuid.cc
src/blestatemachine.cc
src/bledevice.cc
src/pretty_printers.cc
src/att.cc
src/lescan.cc
${HEADERS})
set(EXAMPLES
examples/lescan.cc
examples/blelogger.cc
examples/bluetooth.cc
examples/lescan_simple.cc
examples/temperature.cc)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
find_package(Bluez REQUIRED)
include_directories(${PROJECT_SOURCE_DIR} ${BLUEZ_INCLUDE_DIRS})
add_library(${PROJECT_NAME} SHARED ${SRC})
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 5)
foreach (example_src ${EXAMPLES})
get_filename_component(example_name ${example_src} NAME_WE)
add_executable(${example_name} ${example_src})
target_link_libraries(${example_name} ${PROJECT_NAME} ${BLUEZ_LIBRARIES})
endforeach()
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib)
install(DIRECTORY blepp DESTINATION include)