Commit e2ec3b67 authored by Brad King's avatar Brad King

ENH: Cleanup Find* modules with new HINTS feature

  - The find_* commands now provide a HINTS option.
  - The option specifies paths to be preferred over the system paths.
  - Many Find* modules were using two find calls with NO_DEFAULT_PATH
    to approximate the behavior, but that blocked users from overriding
    things with CMAKE_PREFIX_PATH.
  - This commit uses the HINTS feature to get desired behavior in
    only one find command call.
parent 05434489
......@@ -22,8 +22,7 @@ IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
FIND_PROGRAM(CMAKE_LINKER NAMES link PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_LINKER NAMES link)
FIND_PROGRAM(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
MARK_AS_ADVANCED(CMAKE_LINKER)
......@@ -32,29 +31,18 @@ ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar)
FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib)
FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
IF(NOT CMAKE_RANLIB)
SET(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib")
ENDIF(NOT CMAKE_RANLIB)
FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip)
FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld)
FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm)
FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump)
FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy)
FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
MARK_AS_ADVANCED(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER CMAKE_NM CMAKE_OBJDUMP CMAKE_OBJCOPY)
......@@ -65,8 +53,7 @@ ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
# on Apple there really should be install_name_tool
IF(APPLE)
FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool)
FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
IF(NOT CMAKE_INSTALL_NAME_TOOL)
MESSAGE(FATAL_ERROR "Could not find install_name_tool, please check your installation.")
......
......@@ -66,12 +66,10 @@ ELSE(NOT CURSES_USE_NCURSES)
FIND_FILE(CURSES_HAVE_NCURSES_H ncurses.h)
FIND_FILE(CURSES_HAVE_NCURSES_NCURSES_H ncurses/ncurses.h)
FIND_FILE(CURSES_HAVE_NCURSES_CURSES_H ncurses/curses.h)
FIND_FILE(CURSES_HAVE_CURSES_H curses.h PATHS "${_cursesParentDir}/include" NO_DEFAULT_PATH)
FIND_FILE(CURSES_HAVE_CURSES_H curses.h)
FIND_FILE(CURSES_HAVE_CURSES_H curses.h HINTS "${_cursesParentDir}/include")
FIND_PATH(CURSES_NCURSES_INCLUDE_PATH ncurses.h ncurses/ncurses.h ncurses/curses.h)
FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h PATHS "${_cursesParentDir}/include" NO_DEFAULT_PATH)
FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h)
FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h HINTS "${_cursesParentDir}/include")
# for compatibility with older FindCurses.cmake this has to be in the cache
# FORCE must not be used since this would break builds which preload a cache wqith these variables set
......@@ -81,10 +79,10 @@ ENDIF(NOT CURSES_USE_NCURSES)
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr PATHS "${_cursesLibDir}" NO_DEFAULT_PATH)
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}")
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr )
FIND_LIBRARY(CURSES_FORM_LIBRARY form PATHS "${_cursesLibDir}" NO_DEFAULT_PATH)
FIND_LIBRARY(CURSES_FORM_LIBRARY form HINTS "${_cursesLibDir}")
FIND_LIBRARY(CURSES_FORM_LIBRARY form )
# for compatibility with older FindCurses.cmake this has to be in the cache
......
......@@ -29,13 +29,9 @@
# I'm going to attempt to cut out the middleman and hope
# everything still works.
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
HINTS
$ENV{FREETYPE_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES include
)
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
PATHS
/usr/local/X11R6/include
/usr/local/X11/include
......@@ -46,11 +42,9 @@ FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
)
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
HINTS
$ENV{FREETYPE_DIR}/include/freetype2
NO_DEFAULT_PATH
)
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
PATHS
/usr/local/X11R6/include
/usr/local/X11/include
/usr/X11/include
......@@ -62,21 +56,15 @@ FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
FIND_LIBRARY(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
PATHS
HINTS
$ENV{FREETYPE_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
PATH_SUFFIXES lib64 lib
PATHS
/usr/local/X11R6
/usr/local/X11
/usr/X11
/sw
/usr/freeware
PATH_SUFFIXES lib64 lib
)
# set the user variables
......
......@@ -20,14 +20,9 @@
# #include "gdal.h"
FIND_PATH(GDAL_INCLUDE_DIR gdal.h
HINTS
$ENV{GDAL_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES include
)
FIND_PATH(GDAL_INCLUDE_DIR gdal.h
PATH_SUFFIXES include
PATHS
~/Library/Frameworks/gdal.framework/Headers
/Library/Frameworks/gdal.framework/Headers
......@@ -53,14 +48,9 @@ FIND_PATH(GDAL_INCLUDE_DIR gdal.h
FIND_LIBRARY(GDAL_LIBRARY
NAMES gdal GDAL
PATHS
HINTS
$ENV{GDAL_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(GDAL_LIBRARY
NAMES gdal GDAL
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -72,7 +62,6 @@ FIND_LIBRARY(GDAL_LIBRARY
/opt
/usr/freeware
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;GDAL_ROOT]/lib
PATH_SUFFIXES lib64 lib
)
SET(GDAL_FOUND "NO")
......
......@@ -10,15 +10,9 @@
# Modifications by Alexander Neundorf
FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
PATHS
HINTS
$ENV{GIF_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES include
)
FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -32,16 +26,9 @@ SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib)
FIND_LIBRARY(GIF_LIBRARY
NAMES ${POTENTIAL_GIF_LIBS}
PATHS
HINTS
$ENV{GIF_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(GIF_LIBRARY
NAMES ${POTENTIAL_GIF_LIBS}
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -53,7 +40,6 @@ FIND_LIBRARY(GIF_LIBRARY
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
/usr/freeware
PATH_SUFFIXES lib64 lib
)
# see readme.txt
......
......@@ -103,27 +103,15 @@ ENDIF (NOT CMAKE_BUILD_TYPE)
#SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc")
#SET(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc")
# all calls to FIND_PROGRAM/PATH/LIBRARY() follow the same scheme:
# at first try some special paths with the argument "NO_DEFAULT_PATH"
# so only these paths are checked
# this is followed by a second call to FIND_PROGRAM/PATH/LIBRARY()
# but this time without any paths and without NO_DEFAULT_PATH
# this second call will do nothing if the first call already found
# what it was looking for, if not, it will search only in the default
# directories (/usr, /usr/local, etc.)
#now try to find some kde stuff
FIND_PROGRAM(KDECONFIG_EXECUTABLE NAMES kde-config PATHS
FIND_PROGRAM(KDECONFIG_EXECUTABLE NAMES kde-config
HINTS
$ENV{KDEDIR}/bin
PATHS
/opt/kde3/bin
/opt/kde/bin
NO_DEFAULT_PATH
)
FIND_PROGRAM(KDECONFIG_EXECUTABLE kde-config)
SET(KDE3PREFIX)
IF(KDECONFIG_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --version
......@@ -143,29 +131,26 @@ ENDIF(KDECONFIG_EXECUTABLE)
# at first the KDE include direcory
# kpassdlg.h comes from kdeui and doesn't exist in KDE4 anymore
FIND_PATH(KDE3_INCLUDE_DIR kpassdlg.h
HINTS
$ENV{KDEDIR}/include
${KDE3PREFIX}/include
PATHS
/opt/kde3/include
/opt/kde/include
/usr/include/kde
/usr/local/include/kde
NO_DEFAULT_PATH
)
FIND_PATH(KDE3_INCLUDE_DIR kpassdlg.h)
#now the KDE library directory
FIND_LIBRARY(KDE3_KDECORE_LIBRARY NAMES kdecore
PATHS
HINTS
$ENV{KDEDIR}/lib
${KDE3PREFIX}/lib
PATHS
/opt/kde3/lib
/opt/kde/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY(KDE3_KDECORE_LIBRARY NAMES kdecore)
SET(QT_AND_KDECORE_LIBS ${QT_LIBRARIES} ${KDE3_KDECORE_LIBRARY})
GET_FILENAME_COMPONENT(KDE3_LIB_DIR ${KDE3_KDECORE_LIBRARY} PATH )
......@@ -179,36 +164,33 @@ IF(NOT KDE3_LIBTOOL_DIR)
ENDIF(NOT KDE3_LIBTOOL_DIR)
#now search for the dcop utilities
FIND_PROGRAM(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl PATHS
FIND_PROGRAM(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl
HINTS
$ENV{KDEDIR}/bin
${KDE3PREFIX}/bin
PATHS
/opt/kde3/bin
/opt/kde/bin
NO_DEFAULT_PATH
)
FIND_PROGRAM(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl)
FIND_PROGRAM(KDE3_DCOPIDL2CPP_EXECUTABLE NAMES dcopidl2cpp PATHS
FIND_PROGRAM(KDE3_DCOPIDL2CPP_EXECUTABLE NAMES dcopidl2cpp
HINTS
$ENV{KDEDIR}/bin
${KDE3PREFIX}/bin
PATHS
/opt/kde3/bin
/opt/kde/bin
NO_DEFAULT_PATH
)
FIND_PROGRAM(KDE3_DCOPIDL2CPP_EXECUTABLE NAMES dcopidl2cpp)
FIND_PROGRAM(KDE3_KCFGC_EXECUTABLE NAMES kconfig_compiler PATHS
FIND_PROGRAM(KDE3_KCFGC_EXECUTABLE NAMES kconfig_compiler
HINTS
$ENV{KDEDIR}/bin
${KDE3PREFIX}/bin
PATHS
/opt/kde3/bin
/opt/kde/bin
NO_DEFAULT_PATH
)
FIND_PROGRAM(KDE3_KCFGC_EXECUTABLE NAMES kconfig_compiler)
# KDE3Macros.cmake contains all the KDE specific macros
INCLUDE(KDE3Macros)
......
......@@ -20,16 +20,13 @@ FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
# the suffix must be used since KDEDIRS can be a list of directories which don't have bin/ appended
PATH_SUFFIXES bin
PATHS
HINTS
${CMAKE_INSTALL_PREFIX}
${_KDEDIRS}
/opt/kde4
NO_DEFAULT_PATH
ONLY_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config ONLY_CMAKE_FIND_ROOT_PATH)
IF (NOT KDE4_KDECONFIG_EXECUTABLE)
IF (KDE4_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "ERROR: Could not find KDE4 kde4-config")
......
......@@ -13,13 +13,9 @@
FIND_PATH(LUA_INCLUDE_DIR lua.h
PATHS
HINTS
$ENV{LUA_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES include/lua50 include/lua5.0 include/lua5 include/lua include
)
FIND_PATH(LUA_INCLUDE_DIR lua.h
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -29,19 +25,13 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
PATH_SUFFIXES include/lua50 include/lua5.0 include/lua5 include/lua include
)
FIND_LIBRARY(LUA_LIBRARY_lua
NAMES lua50 lua5.0 lua5 lua
PATHS
HINTS
$ENV{LUA_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(LUA_LIBRARY_lua
NAMES lua50 lua5.0 lua5 lua
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -51,7 +41,6 @@ FIND_LIBRARY(LUA_LIBRARY_lua
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib64 lib
)
# In an OS X framework, lualib is usually included as part of the framework
......@@ -61,15 +50,10 @@ IF(${LUA_LIBRARY_lua} MATCHES "framework")
ELSE(${LUA_LIBRARY_lua} MATCHES "framework")
FIND_LIBRARY(LUA_LIBRARY_lualib
NAMES lualib50 lualib5.0 lualib5 lualib
PATHS
HINTS
$ENV{LUALIB_DIR}
$ENV{LUA_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(LUA_LIBRARY_lualib
NAMES lualib50 lualib5.0 lualib5 lualib
PATHS
/usr/local
/usr
......@@ -77,7 +61,6 @@ ELSE(${LUA_LIBRARY_lua} MATCHES "framework")
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib64 lib
)
IF(LUA_LIBRARY_lualib AND LUA_LIBRARY_lua)
# include the math library for Unix
......
......@@ -13,13 +13,9 @@
FIND_PATH(LUA_INCLUDE_DIR lua.h
PATHS
HINTS
$ENV{LUA_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
)
FIND_PATH(LUA_INCLUDE_DIR lua.h
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -29,19 +25,13 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
)
FIND_LIBRARY(LUA_LIBRARY
NAMES lua51 lua5.1 lua
PATHS
HINTS
$ENV{LUA_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(LUA_LIBRARY
NAMES lua51 lua5.1 lua
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -51,7 +41,6 @@ FIND_LIBRARY(LUA_LIBRARY
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib64 lib
)
IF(LUA_LIBRARY)
......
......@@ -49,13 +49,9 @@
# CMAKE_INCLUDE_PATH to modify the search paths.
FIND_PATH(OPENAL_INCLUDE_DIR al.h
PATHS
HINTS
$ENV{OPENALDIR}
NO_DEFAULT_PATH
PATH_SUFFIXES include/AL include/OpenAL include
)
FIND_PATH(OPENAL_INCLUDE_DIR al.h
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -66,19 +62,13 @@ FIND_PATH(OPENAL_INCLUDE_DIR al.h
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]
PATH_SUFFIXES include/AL include/OpenAL include
)
FIND_LIBRARY(OPENAL_LIBRARY
NAMES OpenAL al openal OpenAL32
PATHS
HINTS
$ENV{OPENALDIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
)
FIND_LIBRARY(OPENAL_LIBRARY
NAMES OpenAL al openal OpenAL32
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -89,7 +79,6 @@ FIND_LIBRARY(OPENAL_LIBRARY
/opt/csw
/opt
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
)
......
......@@ -39,7 +39,7 @@
# Explicit -DVAR=value arguments should still be able to override everything.
FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
PATHS
HINTS
$ENV{OPENTHREADS_INCLUDE_DIR}
$ENV{OPENTHREADS_DIR}/include
$ENV{OPENTHREADS_DIR}
......@@ -48,12 +48,7 @@ FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
$ENV{OSG_DIR}
$ENV{OSGDIR}/include
$ENV{OSGDIR}
NO_DEFAULT_PATH
)
FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
......@@ -69,7 +64,7 @@ FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
FIND_LIBRARY(OPENTHREADS_LIBRARY
NAMES OpenThreads OpenThreadsWin32
PATHS
HINTS
$ENV{OPENTHREADS_LIBRARY_DIR}
$ENV{OPENTHREADS_DIR}/lib64
$ENV{OPENTHREADS_DIR}/lib
......@@ -81,13 +76,6 @@ FIND_LIBRARY(OPENTHREADS_LIBRARY
$ENV{OSGDIR}/lib64
$ENV{OSGDIR}/lib
$ENV{OSGDIR}
NO_DEFAULT_PATH
)
FIND_LIBRARY(OPENTHREADS_LIBRARY
NAMES OpenThreads OpenThreadsWin32
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -110,7 +98,7 @@ FIND_LIBRARY(OPENTHREADS_LIBRARY
FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG
NAMES OpenThreadsd OpenThreadsWin32d
PATHS
HINTS
$ENV{OPENTHREADS_DEBUG_LIBRARY_DIR}
$ENV{OPENTHREADS_LIBRARY_DIR}
$ENV{OPENTHREADS_DIR}/lib64
......@@ -123,13 +111,6 @@ FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG
$ENV{OSGDIR}/lib64
$ENV{OSGDIR}/lib
$ENV{OSGDIR}
NO_DEFAULT_PATH
)
FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG
NAMES OpenThreadsd OpenThreadsWin32d
PATHS
/usr/local/lib64
/usr/local/lib
......
......@@ -11,13 +11,9 @@
# Created by Eric Wing.
FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
PATHS
HINTS
$ENV{PHYSFSDIR}
NO_DEFAULT_PATH
PATH_SUFFIXES include
)
FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
PATH_SUFFIXES include/physfs include
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -27,19 +23,13 @@ FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
PATH_SUFFIXES include/physfs include
)
FIND_LIBRARY(PHYSFS_LIBRARY
NAMES physfs
PATHS
HINTS
$ENV{PHYSFSDIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(PHYSFS_LIBRARY
NAMES physfs
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -49,7 +39,6 @@ FIND_LIBRARY(PHYSFS_LIBRARY
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib64 lib
)
SET(PHYSFS_FOUND "NO")
......
......@@ -30,15 +30,11 @@
# Try the user's environment request before anything else.
FIND_PATH(PRODUCER_INCLUDE_DIR Producer/CameraGroup
PATHS
HINTS
$ENV{PRODUCER_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
NO_DEFAULT_PATH
PATH_SUFFIXES include
)
FIND_PATH(PRODUCER_INCLUDE_DIR Producer/CameraGroup
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -54,16 +50,11 @@ FIND_PATH(PRODUCER_INCLUDE_DIR Producer/CameraGroup
FIND_LIBRARY(PRODUCER_LIBRARY
NAMES Producer
PATHS
HINTS
$ENV{PRODUCER_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(PRODUCER_LIBRARY
NAMES Producer
PATH_SUFFIXES lib64 lib
PATHS
/usr/local
/usr
......@@ -71,7 +62,6 @@ FIND_LIBRARY(PRODUCER_LIBRARY
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib64 lib
)
SET(PRODUCER_FOUND "NO")
......
......@@ -122,13 +122,8 @@ FIND_LIBRARY(QT_QASSISTANTCLIENT_LIBRARY
# qt 3 should prefer QTDIR over the PATH
FIND_PROGRAM(QT_MOC_EXECUTABLE
NAMES moc moc-qt3
PATHS
HINTS
$ENV{QTDIR}/bin
NO_DEFAULT_PATH
)
FIND_PROGRAM(QT_MOC_EXECUTABLE
NAMES moc moc-qt3
PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
......@@ -150,15 +145,12 @@ ENDIF(QT_MOC_EXECUTABLE)
# qt 3 should prefer QTDIR over the PATH
FIND_PROGRAM(QT_UIC_EXECUTABLE uic
PATHS
HINTS
$ENV{QTDIR}/bin
NO_DEFAULT_PATH
)
FIND_PROGRAM(QT_UIC_EXECUTABLE uic
PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
$ENV{QTDIR}/bin
${GLOB_PATHS_BIN}
/usr/local/qt/bin
/usr/lib/qt/bin
......
......@@ -17,20 +17,15 @@ IF(APPLE)
FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
ELSE(APPLE)
FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h
HINTS
$ENV{QUICKTIME_DIR}/include
$ENV{QUICKTIME_DIR}
NO_DEFAULT_PATH
)
FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h)
FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime
HINTS
$ENV{QUICKTIME_DIR}/lib
$ENV{QUICKTIME_DIR}
NO_DEFAULT_PATH
)
FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
ENDIF(APPLE)
SET(QUICKTIME_FOUND "NO")
......
......@@ -53,13 +53,9 @@
# reasons because not all systems place things in SDL/ (see FreeBSD).
FIND_PATH(SDL_INCLUDE_DIR SDL.h
PATHS
HINTS
$ENV{SDLDIR}
NO_DEFAULT_PATH
PATH_SUFFIXES include
)
FIND_PATH(SDL_INCLUDE_DIR SDL.h
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -86,14 +82,9 @@ FIND_PATH(SDL_INCLUDE_DIR SDL.h
# don't confuse it for the version number.
FIND_LIBRARY(SDL_LIBRARY_TEMP
NAMES SDL SDL-1.1
PATHS
HINTS
$ENV{SDLDIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(SDL_LIBRARY_TEMP
NAMES SDL SDL-1.1
PATH_SUFFIXES lib64 lib
PATHS
/usr/local
/usr
......@@ -101,7 +92,6 @@ FIND_LIBRARY(SDL_LIBRARY_TEMP
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib64 lib
)