-
Notifications
You must be signed in to change notification settings - Fork 36
/
CMakeLists.txt
50 lines (40 loc) · 1.05 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
cmake_minimum_required(VERSION 2.8)
project(PandarGeneralSDK)
find_package( Boost REQUIRED COMPONENTS thread)
find_package( PCL REQUIRED COMPONENTS common )
# set (CMAKE_CXX_FLAGS "-fPIC --std=c++11")
ADD_COMPILE_OPTIONS(-std=c++11 )
ADD_COMPILE_OPTIONS(-std=c++14 )
add_subdirectory(src/PandarGeneralRaw)
include_directories(
.
include
src/PandarGeneralRaw/include
${Boost_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
add_library( ${PROJECT_NAME} SHARED
src/pandarGeneral_sdk.cc
src/tcp_command_client.c
src/util.c
src/wrapper.cc
)
target_link_libraries(${PROJECT_NAME}
PandarGeneral
${Boost_LIBRARIES}
${PCL_IO_LIBRARIES}
Boost::thread
pcap
)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(PCL REQUIRED)
add_executable(PandarGeneralTest
test/test.cc
)
target_link_libraries(PandarGeneralTest
${PROJECT_NAME}
${Boost_LIBRARIES}
${PCL_IO_LIBRARIES}
Boost::thread
)
endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})