
# Try to find AssImp library and include path.
# Once done this will define
#
# AssImp_FOUND
# AssImp_INCLUDE_DIR
# AssImp_LIBRARIES
# AssImp_BINARIES
# 

SET (AssImp_BINARIES "")

IF (WIN32)
	FIND_PATH(AssImp_INCLUDE_DIR aiScene.h
		C:/prog/assimp/include
		C:/prg/lib/assimp/include
		DOC "The directory where aiScene.h resides"
	)
	
	if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
		SET (AssImp_LIB_PATHS
			C:/prog/assimp/lib/assimp_release-dll_x64
			C:/prg/lib/assimp/lib/assimp_release-dll_x64
		)
	elseif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
		SET (AssImp_LIB_PATHS
			C:/prog/assimp/lib/assimp_release-dll_win32
			C:/prg/lib/assimp/lib/assimp_release-dll_win32
		)
	endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
		
	FIND_LIBRARY(AssImp_LIBRARY
		NAMES assimp
		PATHS
		${AssImp_LIB_PATHS}
		DOC "The AssImp library"
	)
	
	SET (AssImp_LIBRARIES 
		${AssImp_LIBRARY}
	)
ELSE (WIN32)
	FIND_PATH(AssImp_INCLUDE_DIR aiScene.h
		/usr/local/include/assimp/
	)

	SET (AssImp_LIB_PATHS
		/usr/local/lib/
		/usr/lib/
		/usr/lib32/
	)

	FIND_LIBRARY(AssImp_LIBRARY
		NAMES assimp
		${AssImp_LIB_PATHS}
		DOC "The AssImp library"
	)

	SET (AssImp_LIBRARIES
		${AssImp_LIBRARY}
	)
ENDIF (WIN32)

IF (AssImp_INCLUDE_DIR)
	SET(AssImp_FOUND 1 CACHE STRING "Set to 1 if AssImp is found, 0 otherwise")
ELSE (AssImp_INCLUDE_DIR)
	SET(AssImp_FOUND 0 CACHE STRING "Set to 1 if AssImp is found, 0 otherwise")
ENDIF (AssImp_INCLUDE_DIR)

MARK_AS_ADVANCED( AssImp_FOUND )
