CMakeLists.txt 708 B

12345678910111213141516171819202122232425262728293031323334
  1. # 添加文件
  2. aux_source_directory(error_code error_code)
  3. aux_source_directory(json json)
  4. aux_source_directory(message message)
  5. aux_source_directory(pahoc pahoc)
  6. aux_source_directory(tool tool)
  7. aux_source_directory(rabbitmq rabbitmq)
  8. # 生成静态库
  9. add_library(zx
  10. ${error_code}
  11. ${json}
  12. ${message}
  13. ${pahoc}
  14. ${tool}
  15. ${rabbitmq}
  16. )
  17. # 添加链接静态库
  18. target_link_libraries(zx PUBLIC
  19. ${EIGEN3_LIBRARIES}
  20. ${OpenCV_LIBRARIES}
  21. ${PROTOBUF_LIBRARIES}
  22. ${PCL_LIBRARIES}
  23. rabbitmq::rabbitmq
  24. paho-mqtt3a
  25. -lgflags
  26. glog::glog
  27. )
  28. # 安装库到安装路径
  29. INSTALL (TARGETS zx
  30. DESTINATION lib
  31. )