Add freeimage cmake file.
This commit is contained in:
parent
0f186e688f
commit
68e9f05794
47
cmake/FindFreeImage.cmake
Normal file
47
cmake/FindFreeImage.cmake
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#
|
||||||
|
# Try to find the FreeImage library and include path.
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# FREEIMAGE_FOUND
|
||||||
|
# FREEIMAGE_INCLUDE_PATH
|
||||||
|
# FREEIMAGE_LIBRARY
|
||||||
|
#
|
||||||
|
|
||||||
|
IF (WIN32)
|
||||||
|
FIND_PATH( FREEIMAGE_INCLUDE_PATH FreeImage.h
|
||||||
|
$ENV{PROGRAMFILES}/FreeImage/include
|
||||||
|
${PROJECT_SOURCE_DIR}/FreeImage/include
|
||||||
|
DOC "The directory where FreeImage.h resides")
|
||||||
|
FIND_LIBRARY( FREEIMAGE_LIBRARY
|
||||||
|
NAMES freeimage
|
||||||
|
PATHS
|
||||||
|
$ENV{PROGRAMFILES}/FreeImage/lib
|
||||||
|
${PROJECT_SOURCE_DIR}/FreeImage/bin
|
||||||
|
${PROJECT_SOURCE_DIR}/FreeImage/lib
|
||||||
|
DOC "The FreeImage library")
|
||||||
|
ELSE (WIN32)
|
||||||
|
FIND_PATH( FREEIMAGE_INCLUDE_PATH GL/glew.h
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
|
/sw/include
|
||||||
|
/opt/local/include
|
||||||
|
DOC "The directory where FreeImage.h resides")
|
||||||
|
FIND_LIBRARY( FREEIMAGE_LIBRARY
|
||||||
|
NAMES freeimage
|
||||||
|
PATHS
|
||||||
|
/usr/lib64
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib64
|
||||||
|
/usr/local/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
DOC "The FreeImage library")
|
||||||
|
ENDIF (WIN32)
|
||||||
|
|
||||||
|
IF (FREEIMAGE_INCLUDE_PATH)
|
||||||
|
SET( FREEIMAGE_FOUND TRUE CACHE BOOL "Set to TRUE if GLEW is found, FALSE otherwise")
|
||||||
|
ELSE (FREEIMAGE_INCLUDE_PATH)
|
||||||
|
SET( FREEIMAGE_FOUND FALSE CACHE BOOL "Set to TRUE if GLEW is found, FALSE otherwise")
|
||||||
|
ENDIF (FREEIMAGE_INCLUDE_PATH)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED( FREEIMAGE_FOUND )
|
Loading…
Reference in New Issue
Block a user