cmake_minimum_required(VERSION 2.8.11)


set(VOXELLIB_INCLUDE_DIR ${VOXELSKELETONLIB_LIBRARY_PATH}/include)
set(PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)

include_directories("${PROJECT_INCLUDE_DIR}")
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

include_directories(${VOXELSKELETONLIB_PROJECT_PATH}/include)
include_directories(${VOXELLIB_INCLUDE_DIR})

find_package(Boost COMPONENTS thread system chrono filesystem REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS})
add_definitions(${Boost_DEFINITIONS})

find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})

find_package(ANN REQUIRED)
include_directories(${ANN_INCLUDE_DIR})

message("CMAKE_CURRENT_LIST_DIR: " ${CMAKE_CURRENT_LIST_DIR})

set(sources
  Stopwatch.cpp
  TestReconstructionError.cpp
  TestNoiseReductionDensitySaliency.cpp
  TestReconstructionSpeed.cpp
  TestVelocityFields.cpp
  TestCompletePipeline.cpp
  TestDerivativeVsSaliency.cpp
  TestDerivativeThreshold.cpp
  TestGlobalStreamlineMethods.cpp
  TestNoisySkeletonVsNoidyEdt.cpp
  TestGeodesicEstimate.cpp
  TestHelpers.cpp
)

set(headers
  TestHelpers.h
  Stopwatch.h
)

PREPEND(headers_full ${PROJECT_INCLUDE_DIR} ${headers})

add_executable(SkeletonTest
  ${sources}
  ${headers_full}
)

target_link_libraries(SkeletonTest
  VOXELSKELETONLIB
  ${Boost_LIBRARIES}
)

# installing the resource files
install(TARGETS SkeletonTest
  DESTINATION SkeletonTest
)
