root/OpenSceneGraph/trunk/CMakeModules/FindFOX.cmake @ 9952

Revision 7154, 2.0 kB (checked in by robert, 10 years ago)

From Alexandre Amalric, Fox example

From Robert Osfield, CMake build support for FOX example

Line 
1# Locate gdal
2# This module defines
3# FOX_LIBRARY
4# FOX_FOUND, if false, do not try to link to gdal
5# FOX_INCLUDE_DIR, where to find the headers
6#
7# $FOX_DIR is an environment variable that would
8# correspond to the ./configure --prefix=$FOX_DIR
9#
10# Created by Robert Osfield.
11
12FIND_PATH(FOX_INCLUDE_DIR fx.h
13    $ENV{FOX_DIR}/include/fox-1.6
14    $ENV{FOX_DIR}/fox-1.6
15    $ENV{OSGDIR}/include/fox-1.6
16    $ENV{OSGDIR}/fox-1.6
17    $ENV{OSG_ROOT}/include/fox-1.6
18    ~/Library/Frameworks/fox-1.6
19    /Library/Frameworks/fox-1.6
20    /usr/local/include/fox-1.6
21    /usr/include/fox-1.6
22    /sw/include/fox-1.6 # Fink
23    /opt/local/include/fox-1.6 # DarwinPorts
24    /opt/csw/include/fox-1.6 # Blastwave
25    /opt/include/fox-1.6
26    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include/fox-1.6
27    /usr/freeware/include/fox-1.6
28    $ENV{FOX_DIR}/include
29    $ENV{FOX_DIR}
30    $ENV{OSGDIR}/include
31    $ENV{OSGDIR}
32    $ENV{OSG_ROOT}/include
33    ~/Library/Frameworks
34    /Library/Frameworks
35    /usr/local/include
36    /usr/include
37    /sw/include # Fink
38    /opt/local/include # DarwinPorts
39    /opt/csw/include # Blastwave
40    /opt/include
41    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
42    /usr/freeware/include
43)
44
45MACRO(FIND_FOX_LIBRARY MYLIBRARY MYLIBRARYNAME)
46
47    FIND_LIBRARY(${MYLIBRARY}
48        NAMES ${MYLIBRARYNAME}
49        PATHS
50        $ENV{FOX_DIR}/lib
51        $ENV{FOX_DIR}
52        $ENV{OSGDIR}/lib
53        $ENV{OSGDIR}
54        $ENV{OSG_ROOT}/lib
55        ~/Library/Frameworks
56        /Library/Frameworks
57        /usr/local/lib
58        /usr/lib
59        /sw/lib
60        /opt/local/lib
61        /opt/csw/lib
62        /opt/lib
63        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
64        /usr/freeware/lib64
65    )
66
67ENDMACRO(FIND_FOX_LIBRARY LIBRARY LIBRARYNAME)
68
69FIND_FOX_LIBRARY(FOX_LIBRARY FOX-1.6)
70
71SET(FOX_FOUND "NO")
72IF(FOX_LIBRARY AND FOX_INCLUDE_DIR)
73    SET(FOX_FOUND "YES")
74ENDIF(FOX_LIBRARY AND FOX_INCLUDE_DIR)
Note: See TracBrowser for help on using the browser.