-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
68 lines (56 loc) · 1.01 KB
/
CMakeLists.txt
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
cmake_minimum_required (VERSION 2.6)
project(hci-decoder)
add_subdirectory( btsnoop-decoder )
if(UNIX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -Wall -std=c++11")
endif()
set(LIBRARY_OUTPUT_PATH lib/${CMAKE_BUILD_TYPE})
set(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE})
include_directories(
include
btsnoop-decoder/include
test/include
)
file(
GLOB_RECURSE
source_files
src/*
include/*
)
add_library(
bthci_static
STATIC
${source_files}
)
add_library(
bthci
SHARED
${source_files}
)
target_link_libraries(
bthci_static
btsnoop_static
pthread
)
target_link_libraries(
bthci
btsnoop_static
pthread
)
# test build
file(
GLOB_RECURSE
source_test_files
test/src/*
test/include/*
)
add_executable(
bthci-test
${source_test_files}
)
target_link_libraries(
bthci-test
bthci_static
btsnoop_static
pthread
)