#--------------------------------------------------------
# The CMakeLists.txt for:       lib_bhv_demuster_task Author(s): Filip Stromstad    
#--------------------------------------------------------

# enable C++11 (see top-level CMakeLists.txt for macro definition)
use_cxx11()

# Set System Specific Libraries
if (${WIN32})
  # Windows Libraries
  SET(SYSTEM_LIBS
      )
else (${WIN32})
  # Linux and Apple Libraries
  SET(SYSTEM_LIBS
      m )
endif (${WIN32})

find_library(HELMTASK_LIBRARY NAMES helmtask PATHS ${CMAKE_SOURCE_DIR}/../moos-ivp-swarm/lib NO_DEFAULT_PATH)
  
if(NOT HELMTASK_LIBRARY)
  #TODO: Can make it so this app doesn't build?
  message(FATAL_ERROR "helmtask library not found")
endif()

#--------------------------------------------------------
#                                        BHV_DemusterTask
#--------------------------------------------------------
ADD_LIBRARY(BHV_DemusterTask SHARED 
BHV_DemusterTask.cpp )
  target_include_directories(BHV_DemusterTask PRIVATE 
    ${CMAKE_SOURCE_DIR}/../moos-ivp-swarm/src/lib_helmtask
    ${CMAKE_SOURCE_DIR}/../moos-ivp-pavlab/src/lib_dubin
    )

  TARGET_LINK_LIBRARIES(BHV_DemusterTask
  ${HELMTASK_LIBRARY}
  helmivp
  contacts
  behaviors
  ivpbuild 
  logic
  dubin
  demuster_geometry
  ivpcore 
  bhvutil
  mbutil 
  geometry 
  ${SYSTEM_LIBS} )