if(PYTHON_BINDINGS AND SIP_IS_GOOD)
include(SIPMacros)

include_directories(
  ${SIP_INCLUDE_DIR}
  ${PYTHON_INCLUDE_PATH}
  ${CMAKE_SOURCE_DIR}/src
  ${EIGEN2_INCLUDE_DIR})


# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH  FALSE)

# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 

# the RPATH to be used when installing
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")

# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

file(GLOB SIP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.sip")
set(SIP_INCLUDES ${SIP_FILES})
add_sip_python_module(PyKDL PyKDL/PyKDL.sip orocos-kdl)
#set(SIP_EXTRA_FILES_DEPEND ${SIP_FILES})
endif(PYTHON_BINDINGS AND SIP_IS_GOOD)