# VxLRegions Top level file
#
# Alexander Thomas
# Vittorio Ferrari

CMAKE_MINIMUM_REQUIRED(VERSION 2.2)

PROJECT(VxLRegions)

# -----------------------------------------------------------
# Enter the directory where the VXL source resides ($VXLSRC)
# -----------------------------------------------------------
SET(vxl_inc_root /users/visics/athomas/local/vxl/vxl-1.6.0)

# -----------------------------------------------------------
# Enter the directory where the VXL binaries reside ($VXLBIN)
# -----------------------------------------------------------
SET(vxl_build_root /users/visics/athomas/local64/vxl/bin)

# -----------------------------------------------------------
# If you want to experiment with the parallellogram regions,
# you should install NURBS++ and enter the root directory
# of the installation here. Otherwise comment this out.
# -----------------------------------------------------------
#SET(nurbs_base /users/visics/athomas/local)


# ==============================================================
# Normally it is not necessary to edit anything below this line.
# Only modify the following if you know what you're doing.
# ==============================================================

# -------------------------------------------------- 
# The actual include paths for vxl, vcl, oxl etc.
# --------------------------------------------------
SET(vxl_inc ${vxl_inc_root}/core)

# vcl
SET(vcl_inc ${vxl_inc_root}/vcl)   # trick to avoid cmake.depends

# gel
SET(gel_inc ${vxl_inc_root}/contrib/gel)

#oxl
SET(oxl_inc ${vxl_inc_root}/contrib/oxl)

# conversions
SET(conv_inc ${vxl_inc_root}/contrib/conversions)

# xtra to avoid having to modify lots of files
SET(cont_inc ${vxl_inc_root}/contrib)


# -------------------------------------------------- 
# For the include files that were automatically 
# generated
# --------------------------------------------------
SET(vcl_auto_inc ${vxl_build_root}/vcl)
SET(vxl_auto_inc ${vxl_build_root}/core)

# includes
INCLUDE_DIRECTORIES(${vxl_inc_root} ${vxl_inc} ${VxLRegions_SOURCE_DIR})
INCLUDE_DIRECTORIES(${gel_inc} ${oxl_inc} ${conv_inc} ${vcl_inc} ${cont_inc})
# adding vxl_inc_root allows including with relative path, eg 'vcl/vcl_list.h'

INCLUDE_DIRECTORIES(${vcl_auto_inc} ${vxl_auto_inc})

# link paths
LINK_DIRECTORIES(${vxl_build_root}/lib)

# NURBS++
IF(DEFINED nurbs_base)
  ADD_DEFINITIONS(-DPARALL_REGIONS)
  INCLUDE_DIRECTORIES(${nurbs_base}/include/nurbs++)
  LINK_DIRECTORIES(${nurbs_base}/lib)
ENDIF(DEFINED nurbs_base)

# Recurse into the following 
# subdirectories
SUBDIRS(regions region_extraction region_utility misc_utility region_matching region_propagation vxl_mvl_fix main_processing bin)


