CMakeLists.txt 1023 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # 将本目录下的所有.c 文件添加到DIR_LIB_SRCS变量
  2. include_directories(${PCL_INCLUDE_DIRS})
  3. # FIND_PACKAGE(OpenCV REQUIRED)
  4. include_directories(${OpenCV_INCLUDE_DIRS})
  5. aux_source_directory(. LIB_TOOL)
  6. aux_source_directory(tool LIB_TOOL)
  7. aux_source_directory(error_code LIB_ERROR)
  8. aux_source_directory(TaskQueue LIB_TASK_QUEUE)
  9. aux_source_directory(verify LIB_VERIFY)
  10. # aux_source_directory(system LIB_SYSTEM)
  11. aux_source_directory(rabbitmq LIB_RABBITMQ)
  12. aux_source_directory(communication LIB_COMMUNICATION)
  13. # 生成静态库
  14. add_library(libtool
  15. ${LIB_TOOL}
  16. ${LIB_ERROR}
  17. ${LIB_TASK_QUEUE}
  18. ${LIB_VERIFY}
  19. ${LIB_SYSTEM}
  20. ${LIB_RABBITMQ}
  21. ${LIB_COMMUNICATION}
  22. )
  23. target_include_directories(libtool PUBLIC
  24. ${PCL_INCLUDE_DIRS}
  25. ${OpenCV_INCLUDE_DIRS}
  26. )
  27. target_link_libraries(libtool PUBLIC
  28. ${PCL_LIBRARIES}
  29. ${OpenCV_LIBRARIES}
  30. )
  31. # 安装库到安装路径
  32. INSTALL (TARGETS libtool DESTINATION lib)
  33. # 安装全部头文件到安装路径
  34. INSTALL (FILES
  35. ${ALL_HEAD}
  36. DESTINATION include/libtool
  37. )