12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- cmake_minimum_required(VERSION 2.8.3)
- project(VLP16_measure)
- ## Compile as C++11, supported in ROS Kinetic and newer
- add_compile_options(-std=c++14)
- #add_definitions(-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2)
- FIND_PACKAGE(PCL REQUIRED)
- FIND_PACKAGE(Protobuf REQUIRED)
- find_package(OpenCV REQUIRED)
- FIND_PACKAGE(Glog REQUIRED)
- FIND_PACKAGE(Ceres REQUIRED)
- set(CMAKE_MODULE_PATH "/usr/local/share/")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-as-needed")
- set(CMAKE_CXX_FLAGS "-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")
- set(CMAKE_BUILD_TYPE "RELEASE")
- include_directories(
- src
- src/message
- src/tool
- src/error_code
- src/communication
- /usr/local/include
- /usr/local/include/modbus
- /usr/local/include/snap7
- ${OpenCV_INCLUDE_DIRS}
- ${PCL_INCLUDE_DIRS}
- ${CERES_INCLUDE_DIRS}
- )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src/tool TOOL_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src/error_code ERROR_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src/communication COMMUNICATION_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src/message MESSAGE_SRC )
- add_executable(vlp16_sample src/vlp16_sample.cpp ${ERROR_SRC} ${TOOL_SRC}
- ${COMMUNICATION_SRC} ${MESSAGE_SRC}
- src/vlp16.hpp src/ground_region.cpp src/publisher.cpp
- src/configure.pb.cc src/detect_wheel_ceres.cpp)
- target_link_libraries(vlp16_sample ${CERES_LIBRARIES} ${OpenCV_LIBS}
- ${GLOG_LIBRARIES} ${PCL_LIBRARIES} ${PROTOBUF_LIBRARIES}
- /usr/local/lib/libgflags.a nnxx nanomsg)
|