diff --git a/CMakeLists.txt b/CMakeLists.txt
index 683d7b3..b6b529a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,37 +1,48 @@
-cmake_minimum_required(VERSION 2.8.3)
+cmake_minimum_required(VERSION 3.1)
project(dr_kdl)
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED on)
+set(CMAKE_CXX_EXTENSIONS off)
+add_compile_options(-Wall -Wextra -Wpedantic)
+
find_package(catkin REQUIRED COMPONENTS
sensor_msgs
kdl_parser
- dr_base
- dr_eigen
)
find_package(orocos_kdl REQUIRED)
+find_package(Eigen3 REQUIRED)
catkin_package(
- INCLUDE_DIRS include ${orocos_kdl_INCLUDE_DIRS}
- LIBRARIES ${PROJECT_NAME} ${orocos_kdl_LIBRARIES}
- CATKIN_DEPENDS dr_eigen
+ INCLUDE_DIRS include
+ LIBRARIES ${PROJECT_NAME}
+ CATKIN_DEPENDS sensor_msgs
+ DEPENDS EIGEN3 orocos_kdl
)
-dr_include_directories(
- include/${PROJECT_NAME}
+include_directories(include/${PROJECT_NAME})
+include_directories(SYSTEM
${catkin_INCLUDE_DIRS}
- ${Eigen_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIRS}
)
add_library(${PROJECT_NAME}
src/dr_kdl.cpp
)
-target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Eigen_LIBRARIES} ${orocos_kdl_LIBRARIES})
+target_link_libraries(${PROJECT_NAME}
+ ${catkin_LIBRARIES}
+ ${EIGEN3_LIBRARIES}
+ ${orocos_kdl_LIBRARIES}
+)
-dr_add_gtest(kdl test/kdl.cpp)
-dr_add_gtest(eigen test/eigen.cpp)
-target_link_libraries(${PROJECT_NAME}_test_kdl ${PROJECT_NAME} ${catkin_LIBRARIES})
-target_link_libraries(${PROJECT_NAME}_test_eigen ${PROJECT_NAME} ${catkin_LIBRARIES})
+if (CATKIN_ENABLE_TESTING)
+ catkin_add_gtest(${PROJECT_NAME}_test_kdl test/kdl.cpp)
+ catkin_add_gtest(${PROJECT_NAME}_test_eigen test/eigen.cpp)
+ target_link_libraries(${PROJECT_NAME}_test_kdl ${PROJECT_NAME} ${catkin_LIBRARIES})
+ target_link_libraries(${PROJECT_NAME}_test_eigen ${PROJECT_NAME} ${catkin_LIBRARIES})
+endif()
install(
TARGETS "${PROJECT_NAME}"
diff --git a/package.xml b/package.xml
index 256ed40..2ff7127 100644
--- a/package.xml
+++ b/package.xml
@@ -9,7 +9,8 @@
Maarten de Vries
catkin
- dr_base
- dr_eigen
+ eigen
kdl_parser
+ orocos_kdl
+ sensor_msgs