# 测试相关代码 if(MeasureTest) add_definitions(-DETC_PATH="${CMAKE_CURRENT_LIST_DIR}") endif () # 添加文件 set(AlgTestFile algTest.cpp fit_wheel_ret.h fit_wheel_ret.cpp define.pb.h define.pb.cc ) set(AlgTestLib zx ) add_executable(AlgTest ${AlgTestFile}) # 添加链接静态库 target_link_libraries(AlgTest ${AlgTestLib} ) # 将库文件,可执行文件,头文件安装到指定目录 #GuiYangTest GuiYangReceive install(TARGETS AlgTest LIBRARY DESTINATION lib # 动态库安装路径 ARCHIVE DESTINATION lib # 静态库安装路径 RUNTIME DESTINATION bin # 可执行文件安装路径 PUBLIC_HEADER DESTINATION include # 头文件安装路径 ) install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/etc DESTINATION ${CMAKE_INSTALL_PREFIX} )