|
1 | 1 | cmake_minimum_required(VERSION 3.7) |
2 | | -project(open-simulation-interface) |
| 2 | + |
| 3 | +project(open_simulation_interface) |
| 4 | + |
3 | 5 | find_package(Protobuf 2.6.1 REQUIRED) |
4 | | -file(GLOB OSI_PROTO_FILES osi_*.proto) |
5 | | -PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER ${OSI_PROTO_FILES}) |
6 | | -add_library(open_simulation_interface STATIC ${PROTO_SRC} ${PROTO_HEADER}) |
7 | | -target_include_directories(open_simulation_interface PUBLIC ${PROTOBUF_INCLUDE_DIR}) |
8 | | -target_link_libraries(open_simulation_interface PUBLIC ${PROTOBUF_LIBRARY}) |
9 | | -add_library(open_simulation_interface_pic STATIC ${PROTO_SRC} ${PROTO_HEADER}) |
10 | | -set_property(TARGET open_simulation_interface_pic PROPERTY POSITION_INDEPENDENT_CODE ON) |
11 | | -target_include_directories(open_simulation_interface_pic PUBLIC ${PROTOBUF_INCLUDE_DIR}) |
12 | | -target_link_libraries(open_simulation_interface_pic PUBLIC ${PROTOBUF_LIBRARY}) |
13 | | -set (OSI_PROTOBUF_INCLUDE_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "[OSI] Path to generated protobuf files for the open simulation interface.") |
| 6 | + |
| 7 | +set(OSI_PROTO_FILES |
| 8 | + osi_common.proto |
| 9 | + osi_datarecording.proto |
| 10 | + osi_detectedlandmark.proto |
| 11 | + osi_detectedlane.proto |
| 12 | + osi_detectedobject.proto |
| 13 | + osi_detectedoccupant.proto |
| 14 | + osi_environment.proto |
| 15 | + osi_groundtruth.proto |
| 16 | + osi_landmark.proto |
| 17 | + osi_lane.proto |
| 18 | + osi_lowleveldata.proto |
| 19 | + osi_modelinternal.proto |
| 20 | + osi_object.proto |
| 21 | + osi_occupant.proto |
| 22 | + osi_sensordata.proto |
| 23 | + osi_sensorspecific.proto |
| 24 | +) |
| 25 | + |
| 26 | +protobuf_generate_cpp(PROTO_SRCS PROTO_HEADERS ${OSI_PROTO_FILES}) |
| 27 | + |
| 28 | +add_library(${PROJECT_NAME} STATIC ${PROTO_SRCS} ${PROTO_HEADERS}) |
| 29 | +target_include_directories(${PROJECT_NAME} |
| 30 | + PUBLIC |
| 31 | + ${PROTOBUF_INCLUDE_DIR} |
| 32 | + ${CMAKE_CURRENT_BINARY_DIR} |
| 33 | +) |
| 34 | + |
| 35 | +add_library(${PROJECT_NAME}_pic STATIC ${PROTO_SRCS} ${PROTO_HEADERS}) |
| 36 | +target_include_directories(${PROJECT_NAME}_pic |
| 37 | + PUBLIC |
| 38 | + ${PROTOBUF_INCLUDE_DIR} |
| 39 | + ${CMAKE_CURRENT_BINARY_DIR} |
| 40 | +) |
| 41 | + |
| 42 | +set_property(TARGET ${PROJECT_NAME}_pic PROPERTY POSITION_INDEPENDENT_CODE ON) |
0 commit comments