blob: c58810869cb3075cd57af6232ff1503357f8ed99 (
plain)
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
|
set (tinyb_hci_LIB_INCLUDE_DIRS
${PROJECT_SOURCE_DIR}/api
${PROJECT_SOURCE_DIR}/api/tinyb_hci
${PROJECT_SOURCE_DIR}/include
)
include_directories(
${tinyb_hci_LIB_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
set (tinyb_hci_LIB_SRCS
${PROJECT_SOURCE_DIR}/src/tinyb_hci/HCIUtil.cpp
${PROJECT_SOURCE_DIR}/src/tinyb_hci/UUID.cpp
${PROJECT_SOURCE_DIR}/src/tinyb_hci/HCITypes.cpp
${PROJECT_SOURCE_DIR}/src/tinyb_hci/HCIDiscovery.cpp
# autogenerated files
${CMAKE_CURRENT_BINARY_DIR}/../version.c
)
add_library (tinyb_hci SHARED ${tinyb_hci_LIB_SRCS})
target_link_libraries (
tinyb_hci
${CMAKE_THREAD_LIBS_INIT}
bluetooth
)
set_target_properties(
tinyb_hci
PROPERTIES
SOVERSION ${tinyb_VERSION_MAJOR}
VERSION ${tinyb_VERSION_STRING}
CXX_STANDARD 11
)
install (DIRECTORY ${PROJECT_SOURCE_DIR}/api/tinyb_hci/ DESTINATION include/tinyb_hci)
macro (tinyb_CREATE_INSTALL_PKGCONFIG generated_file install_location)
configure_file (${generated_file}.cmake ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} @ONLY)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} DESTINATION ${install_location})
endmacro (tinyb_CREATE_INSTALL_PKGCONFIG)
tinyb_create_install_pkgconfig (tinyb_hci.pc lib${LIB_SUFFIX}/pkgconfig)
install(TARGETS tinyb_hci LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|