diff --git a/core/roslib/CMakeLists.txt b/core/roslib/CMakeLists.txt index 93556751..08e9092c 100644 --- a/core/roslib/CMakeLists.txt +++ b/core/roslib/CMakeLists.txt @@ -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)