Added local FindFLTK.cmake to avoid problems with FLTK no being found by standard

CMake FindFLTK.cmake.
This commit is contained in:
Robert Osfield 2007-06-04 13:45:58 +00:00
parent 3bc90a837e
commit ac739a2e6a
2 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,60 @@
# Locate gdal
# This module defines
# FLTK_LIBRARY
# FLTK_FOUND, if false, do not try to link to gdal
# FLTK_INCLUDE_DIR, where to find the headers
#
# $FLTK_DIR is an environment variable that would
# correspond to the ./configure --prefix=$FLTK_DIR
#
# Created by Robert Osfield.
FIND_PATH(FLTK_INCLUDE_DIR Fl/Fl.H Fl/Fl.h
$ENV{FLTK_DIR}/include
$ENV{FLTK_DIR}
$ENV{OSGDIR}/include
$ENV{OSGDIR}
$ENV{OSG_ROOT}/include
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
/usr/freeware/include
)
MACRO(FIND_FLTK_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_LIBRARY(${MYLIBRARY}
NAMES ${MYLIBRARYNAME}
PATHS
$ENV{FLTK_DIR}/lib
$ENV{FLTK_DIR}
$ENV{OSGDIR}/lib
$ENV{OSGDIR}
$ENV{OSG_ROOT}/lib
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
/usr/freeware/lib64
)
ENDMACRO(FIND_FLTK_LIBRARY LIBRARY LIBRARYNAME)
FIND_FLTK_LIBRARY(FLTK_LIBRARY fltk)
FIND_FLTK_LIBRARY(FLTK_GL_LIBRARY fltk_gl)
SET(FLTK_FOUND "NO")
IF(FLTK_LIBRARY AND FLTK_INCLUDE_DIR)
SET(FLTK_FOUND "YES")
ENDIF(FLTK_LIBRARY AND FLTK_INCLUDE_DIR)

View File

@ -1,6 +1,6 @@
SET(TARGET_SRC osgviewerFLTK.cpp ) SET(TARGET_SRC osgviewerFLTK.cpp )
SET(TARGET_EXTERNAL_LIBRARIES ${FLTK_LIBRARIES} ) SET(TARGET_EXTERNAL_LIBRARIES ${FLTK_LIBRARY} ${FLTK_GL_LIBRARY})
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR} ) INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR} )