CMakeLists.txt 1020 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # 设置工程名
  2. set(target_name receive_data)
  3. # 添加文件
  4. set(RslidarFile
  5. rslidar/rslidar_config.hpp
  6. rslidar/rslidar_driver.cpp
  7. rslidar/rslidar_driver.h
  8. rslidar/rslidar_manager.cpp
  9. rslidar/rslidar_manager.h
  10. rslidar/rslidar_mqtt_async.cpp
  11. rslidar/rslidar_mqtt_async.h
  12. )
  13. # 生成可执行程序
  14. add_executable(${target_name}
  15. ${RslidarFile}
  16. lidar_manager.h
  17. lidar_manager.cpp
  18. main.cpp
  19. )
  20. # 添加链接静态库
  21. target_link_libraries(${target_name}
  22. zx
  23. ${rs_driver_LIBRARIES}
  24. -lpthread
  25. )
  26. # 安装
  27. install(TARGETS ${target_name}
  28. LIBRARY DESTINATION lib # 动态库安装路径
  29. ARCHIVE DESTINATION lib # 静态库安装路径
  30. RUNTIME DESTINATION bin # 可执行文件安装路径
  31. PUBLIC_HEADER DESTINATION include # 头文件安装路径
  32. )
  33. #install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/etc
  34. # DESTINATION ${CMAKE_INSTALL_PREFIX}
  35. # )