diff --git a/ur_driver/CMakeLists.txt b/ur_driver/CMakeLists.txt
index 17790bf54bf66f48899118ed2f3e697d5378e524..b41109c7995196a717f73213d34bd20a3bca6aad 100644
--- a/ur_driver/CMakeLists.txt
+++ b/ur_driver/CMakeLists.txt
@@ -4,7 +4,7 @@ project(ur_driver)
 ## Find catkin macros and libraries
 ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
 ## is used, also find other catkin packages
-find_package(catkin REQUIRED dynamic_reconfigure)
+find_package(catkin REQUIRED COMPONENTS dynamic_reconfigure)
 
 catkin_python_setup()
 
@@ -16,7 +16,9 @@ generate_dynamic_reconfigure_options(
 ###################################
 ## catkin specific configuration ##
 ###################################
-catkin_package()
+catkin_package(
+    CATKIN_DEPENDS dynamic_reconfigure
+)
 
 #############
 ## Install ##
diff --git a/ur_msgs/CMakeLists.txt b/ur_msgs/CMakeLists.txt
index 20c5fef587a121af6f3dc04417662bbad5847b6a..96a6c576bb4736d9f7bcdfc95b03e20e92602c26 100644
--- a/ur_msgs/CMakeLists.txt
+++ b/ur_msgs/CMakeLists.txt
@@ -8,25 +8,25 @@ find_package(catkin REQUIRED COMPONENTS message_generation std_msgs)
 
 
 ## Generate messages in the 'msg' folder
- add_message_files(
+add_message_files(
    FILES
    Analog.msg
    Digital.msg
    IOStates.msg
    RobotStateRTMsg.msg
    MasterboardDataMsg.msg
- )
+)
 
 ## Generate services in the 'srv' folder
- add_service_files(
+add_service_files(
    FILES
    SetPayload.srv
    SetIO.srv
- )
+)
 
 
 ## Generate added messages and services with any dependencies listed here
- generate_messages(
+generate_messages(
    DEPENDENCIES
    std_msgs
 )