CMakeLists.txt 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. cmake_minimum_required(VERSION 3.5)
  2. project(nmea_ros_bridge)
  3. # Default to C99
  4. if(NOT CMAKE_C_STANDARD)
  5. set(CMAKE_C_STANDARD 99)
  6. endif()
  7. # Default to C++14
  8. if(NOT CMAKE_CXX_STANDARD)
  9. set(CMAKE_CXX_STANDARD 14)
  10. endif()
  11. if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  12. add_compile_options(-Wall -Wextra -Wpedantic)
  13. endif()
  14. # find dependencies
  15. find_package(ament_cmake_auto REQUIRED)
  16. # uncomment the following section in order to fill in
  17. # further dependencies manually.
  18. # find_package(<dependency> REQUIRED)
  19. ament_auto_find_build_dependencies()
  20. ament_auto_add_executable(nmea_tcp src/nmea_tcp.cpp )
  21. ament_auto_add_executable(nmea_udp src/nmea_udp.cpp)
  22. ament_auto_add_executable(nmea_serial src/nmea_serial.cpp)
  23. ament_auto_add_executable(serial_to_tcp_server src/serial_to_tcp_server.cpp)
  24. ament_auto_add_executable(ntrip_to_tcp_server src/ntrip_to_tcp_server.cpp)
  25. ament_auto_add_executable(serial_ntrip_nmea src/serial_ntrip_nmea.cpp)
  26. install(TARGETS
  27. nmea_tcp
  28. nmea_udp
  29. nmea_serial
  30. serial_to_tcp_server
  31. ntrip_to_tcp_server
  32. serial_ntrip_nmea
  33. DESTINATION lib/$(PROJECT_NAME)
  34. )
  35. install(DIRECTORY config launch
  36. DESTINATION share/${PROJECT_NAME})
  37. if(BUILD_TESTING)
  38. find_package(ament_lint_auto REQUIRED)
  39. # the following line skips the linter which checks for copyrights
  40. # uncomment the line when a copyright and license is not present in all source files
  41. #set(ament_cmake_copyright_FOUND TRUE)
  42. # the following line skips cpplint (only works in a git repo)
  43. # uncomment the line when this package is not in a git repo
  44. #set(ament_cmake_cpplint_FOUND TRUE)
  45. ament_lint_auto_find_test_dependencies()
  46. endif()
  47. ament_auto_package()