FindSiftGPU.cmake 1.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
# - Try to find SiftGPU
# Once done this will define
#  
# SIFTGPU_FOUND             - system has UTIL
# SIFTGPU_INCLUDE_DIR       - the UTIL include directory
# SIFTGPU_LIBRARY           - Link these to use UTIL
# SIFTGPU_LIBRARY_DIR       - Library DIR of UTIL
#   

IF (SIFTGPU_INCLUDE_DIR)
	# Already in cache, be silent
	SET(SIFT_GPU_FIND_QUIETLY TRUE)
ENDIF (SIFTGPU_INCLUDE_DIR)

if( WIN32 )
	# TODO: find out which directory to reference here
	set( LIBDIR lib ) 
elseif( UNIX )
	set( LIBDIR bin )
elseif( APPLE )
	set( LIBDIR bin )
endif()


FIND_PATH( SIFTGPU_INCLUDE_DIR SiftGPU/SiftGPU.h PATHS "${CMAKE_SOURCE_DIR}/../SiftGPU/src" )


if( SIFTGPU_INCLUDE_DIR )
	set( SIFTGPU_FOUND TRUE )
	set( SIFTGPU_LIBRARY_DIR ${SIFTGPU_INCLUDE_DIR}/../${LIBDIR} )
	set( SIFTGPU_LIBRARY optimized siftgpu debug siftgpu )
ELSE( SIFTGPU_INCLUDE_DIR )
	SET( SIFTGPU_FOUND FALSE )
ENDIF( SIFTGPU_INCLUDE_DIR )

IF ( SIFTGPU_FOUND )
ELSE ( SIFTGPU_FOUND )
	# MESSAGE( WARNING "Warning: SiftGPU NOT FOUND" ) # Warning is given by OpenFlipper
ENDIF ( SIFTGPU_FOUND )