

cmake_minimum_required(VERSION 2.4)

SET(DIRS
  ./
  /usr/local/include/opencv
  )

set(SRCS
    gsurf_match.cpp
	fasthessian.cpp
	integral.cpp
	ipoint.cpp
	surf.cpp
	utils.cpp
  )

##OpenCV Config
FIND_PACKAGE(OpenCV REQUIRED)
MESSAGE("-- OPENCV include:   " ${OPENCV_INCLUDE_DIR})
MESSAGE("-- OPENCV libs:   " ${OPENCV_LIBRARIES} )

INCLUDE_DIRECTORIES(
  ${DIRS}
  )

LINK_DIRECTORIES(
)

ADD_DEFINITIONS(-DDEBUG -ggdb -O3 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fbranch-probabilities)

if(COMMAND cmake_policy)
   cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

################################

ADD_EXECUTABLE(
  gsurf_match
  ${SRCS}
)

TARGET_LINK_LIBRARIES(
  gsurf_match
  ${OPENCV_LIBRARIES} 
  ${OpenCV_LIBS} 
)

################################

foreach(dir ${DIRS})
  FILE(GLOB files ${dir}/*.h*)
  LIST(APPEND h_files ${files})
endforeach(dir)
add_custom_target(TAGS etags --members -l c++ ${h_files} ${SRCS})


