-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
41 lines (37 loc) · 1.22 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
cmake_minimum_required(VERSION 3.10.2)
project(apollo_carsim_bridge)
## Compile as C++11
add_compile_options(-std=c++11)
## Find libraries
find_package(Protobuf REQUIRED)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
${CMAKE_CURRENT_LIST_DIR}/include
${CMAKE_CURRENT_LIST_DIR}/common
${Protobuf_INCLUDE_DIRS}
)
# Declare a C++ executable
# With catkin_make all packages are built within a single CMake context
# The recommended prefix ensures that target names across packages don't collide
add_library(${PROJECT_NAME} SHARED
common/bridge_header.cc
include/carsim_chassis.pb.cc
include/control_controlcmd.pb.cc
include/header.pb.cc
include/error_code.pb.cc
)
add_executable(${PROJECT_NAME}_send src/udp_bridge_sender_carsim.cc)
add_executable(${PROJECT_NAME}_receive src/udp_bridge_receiver_carsim.cc)
# Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}_send
${PROJECT_NAME}
${PROTOBUF_LIBRARIES}
)
target_link_libraries(${PROJECT_NAME}_receive
${PROJECT_NAME}
${PROTOBUF_LIBRARIES}
)