1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- # Copyright(c) 2019 livoxtech limited.
- cmake_minimum_required(VERSION 2.8.3)
- #---------------------------------------------------------------------------------------
- # Start livox_ros_driver project
- #---------------------------------------------------------------------------------------
- project(NavUI)
- #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
- #---------------------------------------------------------------------------------------
- # find package and the dependecy
- #---------------------------------------------------------------------------------------
- find_package(Boost 1.54 REQUIRED COMPONENTS
- system
- thread
- chrono
- )
- find_package (Eigen3 REQUIRED CONFIG QUIET)
- find_package(Pangolin 0.8 REQUIRED)
- find_package(PCL REQUIRED)
- FIND_PACKAGE(Protobuf REQUIRED)
- FIND_PACKAGE(Glog REQUIRED)
- #---------------------------------------------------------------------------------------
- # Set default build to release
- #---------------------------------------------------------------------------------------
- if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose Release or Debug" FORCE)
- endif()
- #---------------------------------------------------------------------------------------
- # Compiler config
- #---------------------------------------------------------------------------------------
- set(CMAKE_CXX_STANDARD 14)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
- set(CMAKE_CXX_EXTENSIONS OFF)
- include_directories(
- define
- /usr/local/include
- ${Pangolin_INCLUDE_DIRS}
- ${EIGEN3_INCLUDE_DIR}
- ${PCL_INCLUDE_DIRS}
- )
- link_directories("/usr/local/lib")
- ## PCL library
- link_directories(${PCL_LIBRARY_DIRS})
- add_definitions(${PCL_DEFINITIONS})
- #---------------------------------------------------------------------------------------
- # generate excutable and add libraries
- #---------------------------------------------------------------------------------------
- add_executable(${PROJECT_NAME}
- main.cpp
- map.pb.cc
- define/TimerRecord.cpp
- pangolinViewer.cpp
- dijkstra/dijkstra.cpp
- dijkstra/trajectory.cpp
- dijkstra/pose2d.cpp
- emqx/mqttmsg.cpp
- emqx/paho_client.cpp
- emqx/message.pb.cc
- tool/pathcreator.cpp
- tool/proto_tool.cpp
- emqx/terminator_emqx.cpp
- emqx/agv.cpp)
- target_compile_options(${PROJECT_NAME}
- PRIVATE $<$<CXX_COMPILER_ID:GNU>:-Wall>
- )
- #---------------------------------------------------------------------------------------
- # link libraries
- #---------------------------------------------------------------------------------------
- target_link_libraries(${PROJECT_NAME}
- pango_display
- ${PCL_LIBRARIES}
- ${Boost_LIBRARY}
- ${GLOG_LIBRARIES} ${PROTOBUF_LIBRARIES}
- libglog.a libgflags.a
- paho-mqtt3a
- -lpthread
- ipopt
- )
- #---------------------------------------------------------------------------------------
- # precompile macro and compile option
- #---------------------------------------------------------------------------------------
|