# this file makes the libplanner library.
include_directories( ${CMAKE_SOURCE_DIR}/src
                     ${mt_DIR})

file( GLOB SRC_FILES *.cpp )
file( GLOB HDR_FILES *.h )

if( KAUTHAM_IOC )
   message( STATUS "Adding subdirectory IOC")
   add_subdirectory( ioc )
endif( KAUTHAM_IOC )



##############################################################################
##############################################################################
# START Required packages when using OMPL planners
if( KAUTHAM_OMPL )
    #### OMPL package ###############

   if( OMPL_FOUND )
      message( STATUS "OMPL Package FOUND: setting -DKAUTHAM_USE_OMPL flag")
      message( STATUS "OMPL lib is: " ${OMPL_LIBRARIES})
      message( STATUS "OMPL include is: " ${OMPL_INCLUDE_DIRS})
      include_directories( OMPL_INCLUDE_DIRS )
      set ( PLANNER_EXTRA_LIBS ${OMPL_LIBRARIES} )
      message( STATUS "OMPL VERSION is: " ${OMPL_VERSION})
      message( STATUS "Adding OMPL subdirectories")

      file( GLOB SRC_OMPLG_FILES omplg/*.cpp )
      file( GLOB HDR_OMPLG_FILES omplg/*.h )
      file( GLOB SRC_OMPLC_FILES omplc/*.cpp )
      file( GLOB HDR_OMPLC_FILES omplc/*.h )
      #set(KAUTHAM_SRC ${KAUTHAM_SRC} ${SRC_OMPLG_FILES} ${SRC_OMPLC_FILES} PARENT_SCOPE  )

    else( OMPL_FOUND )
      message( STATUS "Error: OMPL Package NOT FOUND. OMPL planers will not be avaliable")
    endif( OMPL_FOUND )
endif( KAUTHAM_OMPL )

set(KAUTHAM_SRC ${KAUTHAM_SRC}
               ${SRC_FILES}
               ${SRC_OMPLOPENDE_FILES}
               ${SRC_OMPLG_FILES}
               ${SRC_OMPLC_FILES}
               PARENT_SCOPE )

set ( EXTRA_LIBS ${EXTRA_LIBS} ${PLANNER_EXTRA_LIBS} PARENT_SCOPE )







