blob: 89ff0588da5b82f0316879f80b6b0501e9445b9c (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
set (direct_bt_LIB_INCLUDE_DIRS
${PROJECT_SOURCE_DIR}/jaulib/include
${PROJECT_SOURCE_DIR}/api
${PROJECT_SOURCE_DIR}/api/direct_bt
${PROJECT_SOURCE_DIR}/include
)
include_directories(
${direct_bt_LIB_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
set (direct_bt_LIB_SRCS
${PROJECT_SOURCE_DIR}/jaulib/src/dfa_utf8_decode.cpp
${PROJECT_SOURCE_DIR}/jaulib/src/environment.cpp
${PROJECT_SOURCE_DIR}/jaulib/src/debug.cpp
${PROJECT_SOURCE_DIR}/jaulib/src/basic_types.cpp
${PROJECT_SOURCE_DIR}/src/ieee11073/DataTypes.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/ATTPDUTypes.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/BTAdapter.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/BTDevice.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/BTGattDesc.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/BTGattChar.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/BTGattService.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/BTGattHandler.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/BTManager.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/BTTypes0.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/BTTypes1.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/GATTNumbers.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/HCIComm.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/HCIHandler.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/HCITypes.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/L2CAPComm.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/MgmtTypes.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/SMPHandler.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/SMPTypes.cpp
${PROJECT_SOURCE_DIR}/src/direct_bt/UUID.cpp
# autogenerated files
${CMAKE_CURRENT_BINARY_DIR}/../version.c
)
add_library (direct_bt SHARED ${direct_bt_LIB_SRCS})
target_link_libraries (
direct_bt
unwind
${CMAKE_THREAD_LIBS_INIT}
)
if(USE_STRIP)
add_custom_command(TARGET direct_bt POST_BUILD
COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}direct_bt${CMAKE_SHARED_LIBRARY_SUFFIX}.${direct_bt_VERSION_STRING}
COMMENT "stripping direct_bt"
VERBATIM
)
endif(USE_STRIP)
set_target_properties(
direct_bt
PROPERTIES
SOVERSION ${direct_bt_VERSION_MAJOR}
VERSION ${direct_bt_VERSION_STRING}
)
install (DIRECTORY ${PROJECT_SOURCE_DIR}/api/direct_bt/ DESTINATION include/direct_bt)
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 (direct_bt.pc lib${LIB_SUFFIX}/pkgconfig)
install(TARGETS direct_bt LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|