Skip to content

Commit

Permalink
disable FREECAD_USE_EXTERNAL_KDL due to incompatibilities with bundle…
Browse files Browse the repository at this point in the history
…d version
  • Loading branch information
wwmayer committed Aug 17, 2018
1 parent 2221820 commit 9f98866
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions src/Mod/Robot/App/CMakeLists.txt
Expand Up @@ -75,24 +75,30 @@ SET(Robot_SRCS
${Python_SRCS}
)

# FIXME: The bundled KDL has some extensions which makes it incompatible
# to an installed KDL. To fix the issue two things must be done:
# * revert the changes (and look for an alternative)
# * it must be avoided to include headers of the bundled version if the
# installed version is used
#
# 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()

else(FREECAD_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()
#
#else(FREECAD_USE_EXTERNAL_KDL)
# here we use the internal supplied kdl
add_definitions(-DKDL_USE_NEW_TREE_INTERFACE=1)
FILE( GLOB KDL_SRCS kdl_cp/[^.]*.cpp )
Expand All @@ -111,7 +117,7 @@ else(FREECAD_USE_EXTERNAL_KDL)

SOURCE_GROUP("KDL" FILES ${KDL_SRCS} ${KDL_HPPS} ${UTIL_SRCS} ${UTIL_HPPS} )

endif(FREECAD_USE_EXTERNAL_KDL)
#endif(FREECAD_USE_EXTERNAL_KDL)

SOURCE_GROUP("Python" FILES ${Python_SRCS})
SOURCE_GROUP("Module" FILES ${Mod_SRCS})
Expand Down

0 comments on commit 9f98866

Please sign in to comment.