Add ability to have external orocos-kdl library instead of the suplied
in FreeCAD, used in Robot and Path workbenches cmake switch: FREECAD_USE_EXTERNAL_KDL Makes Robot workbench and Path compilable on OS X 10.9
This commit is contained in:
parent
bc920f9a24
commit
16c740a6f9
|
@ -119,6 +119,7 @@ OPTION(FREECAD_MAINTAINERS_BUILD "Build FreeCAD for Maintainers, with Docu and 3
|
|||
OPTION(FREECAD_USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
|
||||
OPTION(FREECAD_USE_EXTERNAL_PIVY "Use system installed python-pivy instead of the bundled." OFF)
|
||||
OPTION(FREECAD_USE_EXTERNAL_SMESH "Use system installed smesh instead of the bundled." OFF)
|
||||
OPTION(FREECAD_USE_EXTERNAL_KDL "Use system installed orocos-kdl instead of the bundled." OFF)
|
||||
OPTION(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
|
||||
|
||||
if(APPLE)
|
||||
|
|
|
@ -26,12 +26,6 @@ set(Robot_LIBS
|
|||
FreeCADApp
|
||||
)
|
||||
|
||||
FILE( GLOB KDL_SRCS kdl_cp/[^.]*.cpp )
|
||||
FILE( GLOB KDL_HPPS kdl_cp/[^.]*.hpp kdl_cp/[^.]*.inl)
|
||||
|
||||
FILE( GLOB UTIL_SRCS kdl_cp/utilities/[^.]*.cpp kdl_cp/utilities/[^.]*.cxx)
|
||||
FILE( GLOB UTIL_HPPS kdl_cp/utilities/[^.]*.h kdl_cp/utilities/[^.]*.hpp)
|
||||
|
||||
generate_from_xml(Robot6AxisPy)
|
||||
generate_from_xml(TrajectoryPy)
|
||||
generate_from_xml(WaypointPy)
|
||||
|
@ -79,16 +73,46 @@ SET(Robot_SRCS
|
|||
Simulation.h
|
||||
Waypoint.cpp
|
||||
Waypoint.h
|
||||
${KDL_SRCS}
|
||||
${KDL_HPPS}
|
||||
${UTIL_SRCS}
|
||||
${UTIL_HPPS}
|
||||
${Mod_SRCS}
|
||||
${Python_SRCS}
|
||||
)
|
||||
|
||||
# use external kdl
|
||||
if (FREECAD_USE_EXTERNAL_KDL)
|
||||
find_library(KDL_LIBRARY orocos-kdl)
|
||||
find_path(KDL_INCLUDES kdl/kdl.hpp)
|
||||
if(KDL_LIBRARY)
|
||||
message(STATUS "Found orocos-kdl: ${KDL_LIBRARY}")
|
||||
endif()
|
||||
if(KDL_INCLUDES)
|
||||
message(STATUS "Found orocus_kdl headers: ${KDL_INCLUDES}")
|
||||
endif()
|
||||
if(KDL_LIBRARY AND KDL_INCLUDES)
|
||||
list(APPEND Robot_LIBS ${KDL_LIBRARY})
|
||||
include_directories(${KDL_INCLUDES})
|
||||
else()
|
||||
message(FATAL_ERROR "Using external orocos-kdl was specified but was not found.")
|
||||
endif()
|
||||
|
||||
SOURCE_GROUP("KDL" FILES ${KDL_SRCS} ${KDL_HPPS} ${UTIL_SRCS} ${UTIL_HPPS} )
|
||||
else(FREECAD_USE_EXTERNAL_KDL)
|
||||
# here we use the internal supplied kdl
|
||||
FILE( GLOB KDL_SRCS kdl_cp/[^.]*.cpp )
|
||||
FILE( GLOB KDL_HPPS kdl_cp/[^.]*.hpp kdl_cp/[^.]*.inl)
|
||||
|
||||
FILE( GLOB UTIL_SRCS kdl_cp/utilities/[^.]*.cpp kdl_cp/utilities/[^.]*.cxx)
|
||||
FILE( GLOB UTIL_HPPS kdl_cp/utilities/[^.]*.h kdl_cp/utilities/[^.]*.hpp)
|
||||
|
||||
SET(Robot_SRCS
|
||||
${Robot_SRCS}
|
||||
${KDL_SRCS}
|
||||
${KDL_HPPS}
|
||||
${UTIL_SRCS}
|
||||
${UTIL_HPPS}
|
||||
)
|
||||
|
||||
SOURCE_GROUP("KDL" FILES ${KDL_SRCS} ${KDL_HPPS} ${UTIL_SRCS} ${UTIL_HPPS} )
|
||||
|
||||
endif(FREECAD_USE_EXTERNAL_KDL)
|
||||
|
||||
SOURCE_GROUP("Python" FILES ${Python_SRCS})
|
||||
SOURCE_GROUP("Module" FILES ${Mod_SRCS})
|
||||
|
|
Loading…
Reference in New Issue
Block a user