代码拉取完成,页面将自动刷新
同步操作将从 鱼香ROS/transforms3d_cpp 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required(VERSION 3.4.1)
project(transforms3d_cpp)
set(LIB_VERSION 0.1.0)
set(LIB_NAME transforms3d_cpp)
SET(CMAKE_BUILD_TYPE "DEBUG")
add_compile_options(-Werror)
find_package(Eigen3 REQUIRED)
include_directories(
${EIGEN3_INCLUDE_DIR}
include
)
# 添加代码文件
file(GLOB_RECURSE PROJECT_SRC "src/*.cpp")
# 添加测试文件
file(GLOB_RECURSE PROJECT_TESTS "tests/*_test.cpp")
add_library(${LIB_NAME}
SHARED
${PROJECT_SRC}
)
target_link_libraries(${LIB_NAME} ${EIGEN3_LIB})
if(${CMAKE_BUILD_TYPE} MATCHES "DEBUG")
find_package(GTest REQUIRED)
if(NOT GTest_FOUND)
message("NOT found GTest")
endif()
# 添加测试可执行文件
add_executable(${PROJECT_NAME}_test
${PROJECT_SRC}
${PROJECT_TESTS}
)
target_link_libraries(${PROJECT_NAME}_test
gtest
)
# 代码格式检查
set(CPPLINT_SRC ${FISH_PROTOCOL_SRC} ${FISH_PROTOCOL_TESTS})
list(REMOVE_DUPLICATES CPPLINT_SRC)
foreach(v ${CPPLINT_SRC})
execute_process(
COMMAND cpplint --quiet ${v}
ERROR_VARIABLE _result
)
if( _result)
message(FATAL "cpplint check failed! \n ${_result}")
endif()
endforeach(v)
endif()
# 生成配置文件,安装到系统
install(
DIRECTORY include/
DESTINATION include
)
install(
TARGETS ${LIB_NAME}
EXPORT ${LIB_NAME}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
# add lib.config
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
${LIB_NAME}Config.cmake
VERSION 1.0
COMPATIBILITY AnyNewerVersion
)
install(EXPORT ${LIB_NAME}
FILE ${LIB_NAME}Config.cmake
DESTINATION lib/cmake/${LIB_NAME}
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。