Commits

Martin Felis committed d86dec6

mathwrapper.h now includes rbdlconfig.h which contains all settings

Comments (0)

Files changed (5)

 LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake )
 
 INCLUDE_DIRECTORIES ( 
+	${CMAKE_CURRENT_BINARY_DIR}/
 	src/
 	include/rbdl
 )
 OPTION (BUILD_GUI "Build the (rudimentary) graphical user interface" OFF)
 OPTION (BUILD_TESTS "Build the test executables" OFF)
 OPTION (RBDL_ENABLE_LOGGING "Enable logging (warning: major impact on performance!)" OFF)
-OPTION (RBDL_USE_SIMPLE_MATH "Use slow math instead of Eigen3 library (faster compilation)" OFF)
+OPTION (RBDL_USE_SIMPLE_MATH "Use slow math instead of the fast Eigen3 library (faster compilation)" OFF)
 
 SET ( RBDL_SOURCES 
 	src/mathutils.cc
 
 ADD_LIBRARY ( rbdl SHARED ${RBDL_SOURCES} )
 
-# Option dependend build information
-IF ( RBDL_ENABLE_LOGGING )
-	SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRBDL_ENABLE_LOGGING" )
-ENDIF ( RBDL_ENABLE_LOGGING )
-
-IF ( RBDL_USE_SIMPLE_MATH )
-	SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRBDL_USE_SIMPLE_MATH" )
-ENDIF ( RBDL_USE_SIMPLE_MATH )
-
 IF (BUILD_STATIC)
   ADD_LIBRARY ( rbdl-static STATIC ${RBDL_SOURCES} )
   SET_TARGET_PROPERTIES ( rbdl-static PROPERTIES PREFIX "lib")

example/FindRBDL.cmake

-# - Try to find RBDL
+# Searches for RBDL includes and library files
 #
-#
+# Sets the variables
+#   RBDL_FOUND
+#   RBDL_INCLUDE_DIR
+#   RBDL_LIBRARY
 
 SET (RBDL_FOUND FALSE)
 
 FIND_PATH (RBDL_INCLUDE_DIR rbdl.h
-	/usr/include/
-	/usr/include/rbdl/
-	/usr/local/include/
+	/usr/include
+	/usr/include/rbdl
+	/usr/local/include
 	/usr/local/include/rbdl
+	$ENV{HOME}/local/include
+	$ENV{HOME}/local/include/rbdl
 	$ENV{RBDL_PATH}/src
 	$ENV{RBDL_PATH}/include
 	$ENV{RBDL_PATH}/include/rbdl
 FIND_LIBRARY (RBDL_LIBRARY NAMES rbdl	PATHS
 	/usr/lib
 	/usr/local/lib
+	$ENV{HOME}/local/lib
 	$ENV{RBDL_PATH}
 	$ENV{RBDL_LIBRARY_PATH}
 	)

src/mathwrapper.h

 #ifndef _MATHWRAPPER_H
 #define _MATHWRAPPER_H
 
+#include "rbdlconfig.h"
+
 #ifdef RBDL_USE_SIMPLE_MATH
   #include "SimpleMathFixed.h"
 	#include "cml/cml.h"
 #ifndef _RBDL_H
 #define _RBDL_H
 
-#include "rbdlconfig.h"
-
 #include "mathwrapper.h"
 #include "mathutils.h"
 

src/rbdlconfig.h.cmake

 #cmakedefine RBDL_USE_SIMPLE_MATH
 #cmakedefine RBDL_ENABLE_LOGGING
 
-#include "mathwrapper.h"
-#include "mathutils.h"
-
-#include "Body.h"
-#include "Model.h"
-
-#include "Dynamics.h"
-#include "Joint.h"
-#include "Kinematics.h"
-#include "Logging.h"
-
-#include "Contacts.h"
-
 #endif