CMakeLists.txt 893 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # 测试相关代码
  2. if(MeasureTest)
  3. add_definitions(-DETC_PATH="${CMAKE_CURRENT_LIST_DIR}")
  4. endif ()
  5. # 添加文件
  6. set(AlgTestFile
  7. algTest.cpp
  8. fit_wheel_ret.h
  9. fit_wheel_ret.cpp
  10. define.pb.h
  11. define.pb.cc
  12. )
  13. set(AlgTestLib
  14. zx
  15. )
  16. add_executable(AlgTest ${AlgTestFile})
  17. # 添加链接静态库
  18. target_link_libraries(AlgTest
  19. ${AlgTestLib}
  20. )
  21. # 将库文件,可执行文件,头文件安装到指定目录
  22. #GuiYangTest GuiYangReceive
  23. install(TARGETS AlgTest
  24. LIBRARY DESTINATION lib # 动态库安装路径
  25. ARCHIVE DESTINATION lib # 静态库安装路径
  26. RUNTIME DESTINATION bin # 可执行文件安装路径
  27. PUBLIC_HEADER DESTINATION include # 头文件安装路径
  28. )
  29. install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/etc
  30. DESTINATION ${CMAKE_INSTALL_PREFIX}
  31. )