FILE(
	GLOB
	SOLID_INCLUDE_PATHS
	$ENV{HOME}/include
	/usr/local/include
	/usr/include
	$ENV{ProgramW6432}/solid*/include
	$ENV{ProgramFiles}/solid*/include
)

FILE(
	GLOB
	SOLID_LIBRARY_PATHS
	$ENV{HOME}/lib
	/usr/local/lib
	/usr/lib
	$ENV{ProgramW6432}/solid*/lib
	$ENV{ProgramFiles}/solid*/lib
)

FIND_PATH(
	SOLID_INCLUDE_DIRS
	NAMES
	SOLID/SOLID.h
	HINTS
	${SOLID_INCLUDE_PATHS}
)

FIND_LIBRARY(
	SOLID_LIBRARY_DEBUG
	NAMES
	solidd solidsd
	HINTS
	${SOLID_LIBRARY_PATHS}
)

FIND_LIBRARY(
	SOLID_LIBRARY_RELEASE
	NAMES
	solid solids
	HINTS
	${SOLID_LIBRARY_PATHS}
)

IF (SOLID_LIBRARY_DEBUG AND NOT SOLID_LIBRARY_RELEASE)
	SET(SOLID_LIBRARIES ${SOLID_LIBRARY_DEBUG})
ENDIF (SOLID_LIBRARY_DEBUG AND NOT SOLID_LIBRARY_RELEASE)

IF (SOLID_LIBRARY_RELEASE AND NOT SOLID_LIBRARY_DEBUG)
	SET(SOLID_LIBRARIES ${SOLID_LIBRARY_RELEASE})
ENDIF (SOLID_LIBRARY_RELEASE AND NOT SOLID_LIBRARY_DEBUG)

IF (SOLID_LIBRARY_DEBUG AND SOLID_LIBRARY_RELEASE)
	SET(SOLID_LIBRARIES debug ${SOLID_LIBRARY_DEBUG} optimized ${SOLID_LIBRARY_RELEASE})
ENDIF (SOLID_LIBRARY_DEBUG AND SOLID_LIBRARY_RELEASE)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(
	SOLID
	DEFAULT_MSG
	SOLID_INCLUDE_DIRS
	SOLID_LIBRARIES
)

MARK_AS_ADVANCED(
	SOLID_INCLUDE_DIRS
	SOLID_LIBRARIES
	SOLID_LIBRARY_DEBUG
	SOLID_LIBRARY_RELEASE
) 
