From 104896c3999a20154bb77d99718ca74eb8e40334 Mon Sep 17 00:00:00 2001
From: Guilhem Saurel <guilhem.saurel@laas.fr>
Date: Tue, 17 Dec 2019 16:13:29 +0100
Subject: [PATCH] [CMake] Clean before merge

---
 CMakeLists.txt | 40 +++++++++-------------------------------
 1 file changed, 9 insertions(+), 31 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d0a04f5..d82bffc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,16 +1,13 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
 
-
 SET(PROJECT_ORG pyrene-dev)
 SET(PROJECT_NAME talos_data)
 SET(PROJECT_DESCRIPTION "Talos urdf model, srdf model and other data")
 SET(PROJECT_URL "https://gepgitlab.laas.fr/${PROJECT_ORG}/${PROJECT_NAME}")
 
-# Export CMake Target
 SET(PROJECT_USE_CMAKE_EXPORT TRUE)
-
-# No warning error
-set(CXX_DISABLE_WERROR True)
+SET(CXX_DISABLE_WERROR True)
+SET(CMAKE_CXX_STANDARD 11)
 
 #include(cmake/ros.cmake)
 INCLUDE(cmake/base.cmake)
@@ -26,49 +23,30 @@ catkin_package(
   #  INCLUDE_DIRS include
   #  LIBRARIES talos_description
   CATKIN_DEPENDS roscpp
-#  DEPENDS system_lib
-)
+  #  DEPENDS system_lib
+  )
 
 # Find xml_reflection
 ADD_PROJECT_DEPENDENCY(urdfdom REQUIRED)
 ADD_PROJECT_DEPENDENCY(gazebo 7.0.0 REQUIRED)
-ADD_PROJECT_DEPENDENCY(roscpp)
-
-# Needed due to the CMakeTarget from gazebo.
-INCLUDE_DIRECTORIES(${GAZEBO_INCLUDE_DIRS})
-INCLUDE_DIRECTORIES(${catkin_INCLUDE_DIRS})
-
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-
-
-SET(LIBRARY_NAME ${PROJECT_NAME})
+ADD_COMPILE_DEPENDENCY(roscpp)
 
 ADD_LIBRARY(${PROJECT_NAME}
   SHARED
   src/SpringPlugin.cc
-)
+  )
+
+TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PRIVATE ${GAZEBO_INCLUDE_DIRS})
+TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PRIVATE ${catkin_INCLUDE_DIRS})
 
 INSTALL(TARGETS
   ${PROJECT_NAME}
   EXPORT ${TARGETS_EXPORT_NAME}
   DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
- # DESTINATION bin
- # LIBRARY DESTINATION lib
   )
 
-target_include_directories(${LIBRARY_NAME}
-  PUBLIC
-  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
-  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
-  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>
-  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/>
-)
-
 FOREACH(dir config gazebo meshes robots urdf srdf launch)
   INSTALL(DIRECTORY ${dir}/
     DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir})
 ENDFOREACH(dir)
-
-#SETUP_PROJECT_PACKAGE_FINALIZE()
-- 
GitLab