Changeset 7766

Show
Ignore:
Timestamp:
01/04/08 21:00:18 (7 years ago)
Author:
robert
Message:

From Eric Wing, "Attached are a few Find modules with updates. Among other things, they
contain better support for environmental variables to pre-empt the
autodection default search path order which is very helpful for people
who do automated builds. (I recommend that the remaining modules
consider adding the same system to make things consistent and easier
for those people that want to do the automated builds.)

The CMAKE_PREFIX_PATH has also been added to help people. I don't
recommend adding this to the other modules because it looks like CMake
agreed with my idea and will be adding the support in 2.6. So when
that ships, people will get it for free. (In the meantime, my modules
that do have it, it can be used.)

Finally, I've submitted all of these modules to official CMake plus
more so they will be in the next version of CMake. It looks like I may
need to sort some compatibility issues out with the KDE people who
seem to have conflicting modules, but this is unrelated to the updates
submitted here as OSG already has these conflicts. I figured I would
just sync OSG up with my current/best versions.

Also of note, I added the large batch of Findosg*.cmake modules to
CMake so people building against OpenSceneGraph can use these without
writing their own. I wasn't sure if I should submit them here or not
since they are for building against OSG and not for building OSG
itself. So they are not included.
"

Location:
OpenSceneGraph/trunk/CMakeModules
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/CMakeModules/FindFreeType.cmake

    r7025 r7766  
    2626# everything still works. 
    2727FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h  
    28     $ENV{FREETYPE_DIR} 
    29     /usr/local/include 
    30     /usr/include 
    31     /usr/local/X11R6 
    32     /usr/X11R6/include 
    33     /sw/include 
    34     /opt/local/include 
    35     /opt/csw/include 
    36     /opt/include 
    37     /usr/freeware/include/freetype2 
     28  $ENV{FREETYPE_DIR} 
     29  NO_DEFAULT_PATH 
     30  PATH_SUFFIXES include     
     31) 
     32FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h  
     33  PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     34  NO_DEFAULT_PATH 
     35  PATH_SUFFIXES include 
     36) 
     37FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h  
     38  PATHS 
     39  /usr/local 
     40  /usr 
     41  /usr/local/X11R6 
     42  /usr/local/X11 
     43  /usr/X11R6 
     44  /usr/X11 
     45  /sw 
     46  /opt/local 
     47  /opt/csw 
     48  /opt 
     49  /usr/freeware 
     50  PATH_SUFFIXES include 
    3851) 
    3952 
    4053FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h  
    41     $ENV{FREETYPE_DIR}/include/freetype2 
    42     /usr/local/include/freetype2 
    43     /usr/include/freetype2 
    44     /usr/local/X11R6/include/freetype2 
    45     /usr/X11R6/include/freetype2 
    46     /sw/include/freetype2 
    47     /opt/local/include/freetype2 
    48     /opt/csw/include/freetype2 
    49     /opt/include/freetype2 
    50     /usr/freeware/include/freetype2 
     54  $ENV{FREETYPE_DIR}/include/freetype2 
     55  NO_DEFAULT_PATH 
     56) 
     57FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h  
     58  PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     59  NO_DEFAULT_PATH 
     60  PATH_SUFFIXES include/freetype2 
     61) 
     62FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h  
     63  /usr/local/include/freetype2 
     64  /usr/include/freetype2 
     65  /usr/local/X11R6/include/freetype2 
     66  /usr/local/X11/include/freetype2 
     67  /usr/X11R6/include/freetype2 
     68  /usr/X11/include/freetype2 
     69  /sw/include/freetype2 
     70  /opt/local/include/freetype2 
     71  /opt/csw/include/freetype2 
     72  /opt/include/freetype2 
     73  /usr/freeware/include/freetype2 
    5174) 
    5275 
    5376FIND_LIBRARY(FREETYPE_LIBRARY  
    54     NAMES freetype libfreetype freetype219 
    55     PATHS 
    56     $ENV{FREETYPE_DIR}/lib 
    57     $ENV{FREETYPE_DIR}/lib 
    58     /usr/local/lib 
    59     /usr/lib 
    60     /usr/local/X11R6/lib 
    61     /usr/X11R6/lib 
    62     /sw/lib 
    63     /opt/local/lib 
    64     /opt/csw/lib 
    65     /opt/lib 
    66     /usr/freeware/lib64 
     77  NAMES freetype libfreetype freetype219 
     78  PATHS 
     79  $ENV{FREETYPE_DIR} 
     80  NO_DEFAULT_PATH 
     81  PATH_SUFFIXES lib64 lib  
     82) 
     83FIND_LIBRARY(FREETYPE_LIBRARY  
     84  NAMES freetype libfreetype freetype219 
     85  PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     86  NO_DEFAULT_PATH 
     87  PATH_SUFFIXES lib64 lib  
     88) 
     89FIND_LIBRARY(FREETYPE_LIBRARY  
     90  NAMES freetype libfreetype freetype219 
     91  PATHS 
     92  /usr/local 
     93  /usr 
     94  /usr/local/X11R6 
     95  /usr/local/X11 
     96  /usr/X11R6 
     97  /usr/X11 
     98  /sw 
     99  /opt/local 
     100  /opt/csw 
     101  /opt 
     102  /usr/freeware 
     103  PATH_SUFFIXES lib64 lib 
    67104) 
    68105 
    69106IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) 
    70     SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") 
     107  SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") 
    71108ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) 
    72109 
     
    74111SET(FREETYPE_FOUND "NO") 
    75112IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS) 
    76     SET(FREETYPE_FOUND "YES") 
     113  SET(FREETYPE_FOUND "YES") 
    77114ENDIF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS) 
    78115 
  • OpenSceneGraph/trunk/CMakeModules/FindGDAL.cmake

    r7226 r7766  
    55# GDAL_INCLUDE_DIR, where to find the headers 
    66# 
    7 # $GDAL_DIR is an environment variable that would 
     7# $GDALDIR is an environment variable that would 
    88# correspond to the ./configure --prefix=$GDAL_DIR 
     9# used in building gdal. 
    910# 
    10 # Created by Robert Osfield.  
     11# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it  
     12# for osgTerrain so I whipped this module together for completeness. 
     13# I actually don't know the conventions or where files are typically 
     14# placed in distros. 
     15# Any real gdal users are encouraged to correct this (but please don't 
     16# break the OS X framework stuff when doing so which is what usually seems  
     17# to happen). 
     18 
     19# This makes the presumption that you are include gdal.h like 
     20# #include "gdal.h" 
    1121 
    1222FIND_PATH(GDAL_INCLUDE_DIR gdal.h 
    13     ${GDAL_DIR}/include 
    14     $ENV{GDAL_DIR}/include 
    15     $ENV{GDAL_DIR} 
    16     $ENV{OSGDIR}/include 
    17     $ENV{OSGDIR} 
    18     $ENV{OSG_ROOT}/include 
    19     ~/Library/Frameworks 
    20     /Library/Frameworks 
    21     /usr/local/include 
    22     /usr/include 
    23     /usr/include/gdal 
    24     /sw/include # Fink 
    25     /opt/local/include # DarwinPorts 
    26     /opt/csw/include # Blastwave 
    27     /opt/include 
    28     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include 
    29     /usr/freeware/include 
     23  $ENV{GDAL_DIR} 
     24  NO_DEFAULT_PATH 
     25    PATH_SUFFIXES include 
     26) 
     27 
     28FIND_PATH(GDAL_INCLUDE_DIR gdal.h 
     29    PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     30    NO_DEFAULT_PATH 
     31    PATH_SUFFIXES include 
     32) 
     33 
     34FIND_PATH(GDAL_INCLUDE_DIR gdal.h 
     35  PATHS 
     36  ~/Library/Frameworks/gdal.framework/Headers 
     37  /Library/Frameworks/gdal.framework/Headers 
     38  /usr/local/include/gdal 
     39  /usr/local/include/GDAL 
     40  /usr/local/include 
     41  /usr/include/gdal 
     42  /usr/include/GDAL 
     43  /usr/include 
     44  /sw/include/gdal  
     45  /sw/include/GDAL  
     46  /sw/include # Fink 
     47  /opt/local/include/gdal 
     48  /opt/local/include/GDAL 
     49  /opt/local/include # DarwinPorts 
     50  /opt/csw/include/gdal 
     51  /opt/csw/include/GDAL 
     52  /opt/csw/include # Blastwave 
     53  /opt/include/gdal 
     54  /opt/include/GDAL 
     55  /opt/include 
    3056) 
    3157 
    3258FIND_LIBRARY(GDAL_LIBRARY  
    33     NAMES gdal gdal_i gdal1.4.0 gdal1.3.2 
    34     PATHS 
    35     ${GDAL_DIR}/lib 
    36     $ENV{GDAL_DIR}/lib 
    37     $ENV{GDAL_DIR} 
    38     $ENV{OSGDIR}/lib 
    39     $ENV{OSGDIR} 
    40     $ENV{OSG_ROOT}/lib 
     59  NAMES gdal GDAL 
     60  PATHS 
     61  $ENV{GDAL_DIR} 
     62  NO_DEFAULT_PATH 
     63  PATH_SUFFIXES lib64 lib 
     64) 
     65FIND_LIBRARY(GDAL_LIBRARY  
     66  NAMES gdal GDAL 
     67  PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     68    NO_DEFAULT_PATH 
     69    PATH_SUFFIXES lib64 lib 
     70) 
     71FIND_LIBRARY(GDAL_LIBRARY  
     72  NAMES gdal GDAL 
     73  PATHS 
    4174    ~/Library/Frameworks 
    4275    /Library/Frameworks 
    43     /usr/local/lib 
    44     /usr/lib 
    45     /sw/lib 
    46     /opt/local/lib 
    47     /opt/csw/lib 
    48     /opt/lib 
    49     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib 
    50     /usr/freeware/lib64 
     76    /usr/local 
     77    /usr 
     78    /sw 
     79    /opt/local 
     80    /opt/csw 
     81    /opt 
     82    /usr/freeware 
     83    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;GDAL_ROOT]/lib 
     84  PATH_SUFFIXES lib64 lib 
    5185) 
    5286 
    5387SET(GDAL_FOUND "NO") 
    5488IF(GDAL_LIBRARY AND GDAL_INCLUDE_DIR) 
    55     SET(GDAL_FOUND "YES") 
     89  SET(GDAL_FOUND "YES") 
    5690ENDIF(GDAL_LIBRARY AND GDAL_INCLUDE_DIR) 
    5791 
    5892 
     93 
  • OpenSceneGraph/trunk/CMakeModules/FindGIFLIB.cmake

    r7025 r7766  
    1 # Locate gdal 
    21# This module defines 
    32# GIFLIB_LIBRARY 
    4 # GIFLIB_FOUND, if false, do not try to link to gdal  
     3# GIFLIB_FOUND, if false, do not try to link  
    54# GIFLIB_INCLUDE_DIR, where to find the headers 
    65# 
    76# $GIFLIB_DIR is an environment variable that would 
    87# correspond to the ./configure --prefix=$GIFLIB_DIR 
    9 # used in building gdal. 
    108# 
    119# Created by Eric Wing.  
    1210 
    1311FIND_PATH(GIFLIB_INCLUDE_DIR gif_lib.h 
    14     $ENV{GIFLIB_DIR}/include 
    15     $ENV{GIFLIB_DIR} 
    16     $ENV{OSGDIR}/include 
    17     $ENV{OSGDIR} 
    18     $ENV{OSG_ROOT}/include 
    19     ~/Library/Frameworks 
    20     /Library/Frameworks 
    21     /usr/local/include 
    22     /usr/include 
    23     /sw/include # Fink 
    24     /opt/local/include # DarwinPorts 
    25     /opt/csw/include # Blastwave 
    26     /opt/include 
    27     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include 
    28     /usr/freeware/include 
     12  PATHS 
     13  $ENV{GIFLIB_DIR} 
     14  NO_DEFAULT_PATH 
     15  PATH_SUFFIXES include 
     16) 
     17 
     18FIND_PATH(GIFLIB_INCLUDE_DIR gif_lib.h 
     19  PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     20  NO_DEFAULT_PATH 
     21  PATH_SUFFIXES include 
     22) 
     23 
     24FIND_PATH(GIFLIB_INCLUDE_DIR gif_lib.h 
     25  PATHS 
     26  ~/Library/Frameworks 
     27  /Library/Frameworks 
     28  /usr/local/include 
     29  /usr/include 
     30  /sw/include # Fink 
     31  /opt/local/include # DarwinPorts 
     32  /opt/csw/include # Blastwave 
     33  /opt/include 
     34  [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include 
     35  /usr/freeware/include 
    2936) 
    3037 
    3138FIND_LIBRARY(GIFLIB_LIBRARY  
    32     NAMES gif ungif libgif libungif 
    33     PATHS 
    34     $ENV{GIFLIB_DIR}/lib 
    35     $ENV{GIFLIB_DIR} 
    36     $ENV{OSGDIR}/lib 
    37     $ENV{OSGDIR} 
    38     $ENV{OSG_ROOT}/lib 
    39     ~/Library/Frameworks 
    40     /Library/Frameworks 
    41     /usr/local/lib 
    42     /usr/lib 
    43     /sw/lib 
    44     /opt/local/lib 
    45     /opt/csw/lib 
    46     /opt/lib 
    47     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib 
    48     /usr/freeware/lib64 
     39  NAMES gif ungif libgif libungif 
     40  PATHS 
     41  $ENV{GIFLIB_DIR} 
     42  NO_DEFAULT_PATH 
     43  PATH_SUFFIXES lib64 lib 
     44) 
     45 
     46FIND_LIBRARY(GIFLIB_LIBRARY  
     47  NAMES gif ungif libgif libungif 
     48  PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     49  NO_DEFAULT_PATH 
     50  PATH_SUFFIXES lib64 lib 
     51) 
     52 
     53FIND_LIBRARY(GIFLIB_LIBRARY  
     54  NAMES gif ungif libgif libungif 
     55  PATHS 
     56  ~/Library/Frameworks 
     57  /Library/Frameworks 
     58  /usr/local 
     59  /usr 
     60  /sw 
     61  /opt/local 
     62  /opt/csw 
     63  /opt 
     64  [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] 
     65  /usr/freeware 
     66  PATH_SUFFIXES lib64 lib 
    4967) 
    5068 
    5169SET(GIFLIB_FOUND "NO") 
    5270IF(GIFLIB_LIBRARY AND GIFLIB_INCLUDE_DIR) 
    53     SET(GIFLIB_FOUND "YES") 
     71  SET(GIFLIB_FOUND "YES") 
    5472ENDIF(GIFLIB_LIBRARY AND GIFLIB_INCLUDE_DIR) 
    5573 
  • OpenSceneGraph/trunk/CMakeModules/FindOpenThreads.cmake

    r7025 r7766  
    4444 
    4545FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread 
     46    PATHS 
    4647    $ENV{OPENTHREADS_INCLUDE_DIR} 
    4748    $ENV{OPENTHREADS_DIR}/include 
     
    5051    $ENV{OSG_DIR}/include 
    5152    $ENV{OSG_DIR} 
     53    $ENV{OSGDIR}/include 
     54    $ENV{OSGDIR} 
    5255    NO_DEFAULT_PATH 
    5356) 
    5457 
    55 IF(NOT OPENTHREADS_INCLUDE_DIR) 
    56     FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread 
    57         PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
    58         PATH_SUFFIXES include 
    59     ) 
    60 ENDIF(NOT OPENTHREADS_INCLUDE_DIR) 
     58FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread 
     59    PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     60    NO_DEFAULT_PATH 
     61    PATH_SUFFIXES include 
     62) 
    6163 
    62 IF(NOT OPENTHREADS_INCLUDE_DIR) 
    63     FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread 
    64         ~/Library/Frameworks 
    65         /Library/Frameworks 
    66         /usr/local/include 
    67         /usr/include 
    68         /sw/include # Fink 
    69         /opt/local/include # DarwinPorts 
    70         /opt/csw/include # Blastwave 
    71         /opt/include 
    72         [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/include 
    73         [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include 
    74     ) 
    75 ENDIF(NOT OPENTHREADS_INCLUDE_DIR) 
     64FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread 
     65    ~/Library/Frameworks 
     66    /Library/Frameworks 
     67    /usr/local/include 
     68    /usr/include 
     69    /sw/include # Fink 
     70    /opt/local/include # DarwinPorts 
     71    /opt/csw/include # Blastwave 
     72    /opt/include 
     73    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/include 
     74    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include 
     75) 
    7676 
    7777 
     
    8787    $ENV{OSG_DIR}/lib 
    8888    $ENV{OSG_DIR} 
     89    $ENV{OSGDIR}/lib64 
     90    $ENV{OSGDIR}/lib 
     91    $ENV{OSGDIR} 
    8992    NO_DEFAULT_PATH 
    9093) 
    9194 
    92 IF(NOT OPENTHREADS_LIBRARY) 
    93     FIND_LIBRARY(OPENTHREADS_LIBRARY  
    94         NAMES OpenThreads OpenThreadsWin32  
    95         PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
    96         PATH_SUFFIXES lib64 lib 
    97     ) 
    98 ENDIF(NOT OPENTHREADS_LIBRARY) 
     95FIND_LIBRARY(OPENTHREADS_LIBRARY  
     96    NAMES OpenThreads OpenThreadsWin32  
     97  PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     98    NO_DEFAULT_PATH 
     99    PATH_SUFFIXES lib64 lib 
     100) 
    99101 
    100 IF(NOT OPENTHREADS_LIBRARY) 
    101     FIND_LIBRARY(OPENTHREADS_LIBRARY  
    102         NAMES OpenThreads OpenThreadsWin32  
    103         PATHS 
    104         ~/Library/Frameworks 
    105         /Library/Frameworks 
    106         /usr/local/lib64 
    107         /usr/local/lib 
    108         /usr/lib64 
    109         /usr/lib 
    110         /sw/lib64 
    111         /sw/lib 
    112         /opt/local/lib64 
    113         /opt/local/lib 
    114         /opt/csw/lib64 
    115         /opt/csw/lib 
    116         /opt/lib64 
    117         /opt/lib 
    118         [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib 
    119         [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib 
    120     ) 
    121 ENDIF(NOT OPENTHREADS_LIBRARY) 
     102FIND_LIBRARY(OPENTHREADS_LIBRARY  
     103    NAMES OpenThreads OpenThreadsWin32  
     104    PATHS 
     105    ~/Library/Frameworks 
     106    /Library/Frameworks 
     107    /usr/local/lib64 
     108    /usr/local/lib 
     109    /usr/lib64 
     110    /usr/lib 
     111    /sw/lib64 
     112    /sw/lib 
     113    /opt/local/lib64 
     114    /opt/local/lib 
     115    /opt/csw/lib64 
     116    /opt/csw/lib 
     117    /opt/lib64 
     118    /opt/lib 
     119    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib 
     120    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib 
     121) 
    122122 
    123123 
     
    134134    $ENV{OSG_DIR}/lib 
    135135    $ENV{OSG_DIR} 
    136     ${CMAKE_PREFIX_PATH}/lib64 
    137     ${CMAKE_PREFIX_PATH}/lib 
    138     ${CMAKE_PREFIX_PATH} 
     136    $ENV{OSGDIR}/lib64 
     137    $ENV{OSGDIR}/lib 
     138    $ENV{OSGDIR} 
    139139    NO_DEFAULT_PATH 
    140140) 
    141141 
    142 IF(NOT OPENTHREADS_LIBRARY_DEBUG) 
    143     FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG  
    144         NAMES OpenThreadsd OpenThreadsWin32d 
    145         PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
    146         PATH_SUFFIXES lib64 lib 
    147     ) 
    148 ENDIF(NOT OPENTHREADS_LIBRARY_DEBUG) 
     142FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG  
     143    NAMES OpenThreadsd OpenThreadsWin32d 
     144    PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     145    NO_DEFAULT_PATH 
     146    PATH_SUFFIXES lib64 lib 
     147) 
    149148 
    150 IF(NOT OPENTHREADS_LIBRARY_DEBUG) 
    151     FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG  
    152         NAMES OpenThreadsd OpenThreadsWin32d 
    153         PATHS 
    154         /usr/local/lib64 
    155         /usr/local/lib 
    156         /usr/lib64 
    157         /usr/lib 
    158         /sw/lib64 
    159         /sw/lib 
    160         /opt/local/lib64 
    161         /opt/local/lib 
    162         /opt/csw/lib64 
    163         /opt/csw/lib 
    164         /opt/lib64 
    165         /opt/lib 
    166         [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib 
    167         [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib 
    168     ) 
    169 ENDIF(NOT OPENTHREADS_LIBRARY_DEBUG) 
     149FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG  
     150    NAMES OpenThreadsd OpenThreadsWin32d 
     151    PATHS 
     152    /usr/local/lib64 
     153    /usr/local/lib 
     154    /usr/lib64 
     155    /usr/lib 
     156    /sw/lib64 
     157    /sw/lib 
     158    /opt/local/lib64 
     159    /opt/local/lib 
     160    /opt/csw/lib64 
     161    /opt/csw/lib 
     162    /opt/lib64 
     163    /opt/lib 
     164    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib 
     165    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib 
     166) 
    170167 
    171168 
  • OpenSceneGraph/trunk/CMakeModules/FindQuickTime.cmake

    r7025 r7766  
    77# $QUICKTIME_DIR is an environment variable that would 
    88# correspond to the ./configure --prefix=$QUICKTIME_DIR 
    9 # used in building gdal. 
    109# 
    1110# Created by Eric Wing.  
     
    1514 
    1615IF(APPLE) 
    17     FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h) 
    18     FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime) 
     16  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h) 
     17  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime) 
    1918ELSE(APPLE) 
    20     FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h 
    21         $ENV{QUICKTIME_DIR}/include 
    22         $ENV{QUICKTIME_DIR} 
    23     ) 
    24     FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime) 
     19  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h 
     20    $ENV{QUICKTIME_DIR}/include 
     21    $ENV{QUICKTIME_DIR} 
     22    NO_DEFAULT_PATH 
     23  ) 
     24  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h 
     25    PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     26    NO_DEFAULT_PATH 
     27    PATH_SUFFIXES include 
     28  ) 
     29  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h) 
     30 
     31  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime 
     32    $ENV{QUICKTIME_DIR}/lib 
     33    $ENV{QUICKTIME_DIR} 
     34    NO_DEFAULT_PATH 
     35  ) 
     36  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime 
     37    PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this. 
     38    NO_DEFAULT_PATH 
     39    PATH_SUFFIXES lib64 lib 
     40  ) 
     41  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime) 
    2542ENDIF(APPLE) 
    2643 
    2744SET(QUICKTIME_FOUND "NO") 
    2845IF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR) 
    29     SET(QUICKTIME_FOUND "YES") 
     46  SET(QUICKTIME_FOUND "YES") 
    3047ENDIF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR) 
    3148