diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9cee35b..a628238 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,8 +20,10 @@ include_directories(include ${catkin_INCLUDE_DIRS})
add_library(laser_geometry src/laser_geometry.cpp)
target_link_libraries(laser_geometry ${Boost_LIBRARIES} ${tf_LIBRARIES})
-catkin_add_gtest(projection_test test/projection_test.cpp)
-target_link_libraries(projection_test laser_geometry)
+if(CATKIN_ENABLE_TESTING)
+ catkin_add_gtest(projection_test test/projection_test.cpp)
+ target_link_libraries(projection_test laser_geometry)
+endif()
install(TARGETS laser_geometry
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
diff --git a/package.xml b/package.xml
index 83e02e2..b000bde 100644
--- a/package.xml
+++ b/package.xml
@@ -15,7 +15,7 @@
http://ros.org/wiki/laser_geometry
- catkin
+ catkin
sensor_msgs
roscpp