make gtest optional, #3837

This commit is contained in:
Brian Gerkey 2012-02-16 20:41:19 +00:00
parent 65e13ba9fc
commit 0c8ca2eae9
1 changed files with 7 additions and 5 deletions

View File

@ -35,9 +35,11 @@ catkin_project(roslib
)
#integration tests
find_package(GTest)
if(GTEST_FOUND)
add_gtest(${PROJECT_NAME}-utest test/utest.cpp)
target_link_libraries(${PROJECT_NAME}-utest roslib ${Boost_LIBRARIES} ${ROS_LIBRARIES})
add_gtest(${PROJECT_NAME}-utest test/utest.cpp)
target_link_libraries(${PROJECT_NAME}-utest roslib ${Boost_LIBRARIES} ${ROS_LIBRARIES})
add_gtest(${PROJECT_NAME}-test_package test/package.cpp)
target_link_libraries(${PROJECT_NAME}-test_package roslib ${ROS_LIBRARIES})
add_gtest(${PROJECT_NAME}-test_package test/package.cpp)
target_link_libraries(${PROJECT_NAME}-test_package roslib ${ROS_LIBRARIES})
endif(GTEST_FOUND)