Commit cfe4ac4b authored by Rolf Eike Beer's avatar Rolf Eike Beer

use PATH_SUFFIXES to simplify find_* calls

Especially remove "lib64" when the given paths are all Unix ones and "lib" is
also explicitely given. In that case CMake will search "lib64" anyway for
platforms where it is known to make sense.
parent b04650e1
......@@ -20,13 +20,15 @@ find_path(DART_ROOT README.INSTALL
HINTS
ENV DART_ROOT
PATHS
${PROJECT_SOURCE_DIR}/Dart
/usr/share/Dart
C:/Dart
"$ENV{ProgramFiles}/Dart"
"C:/Program Files/Dart"
${PROJECT_SOURCE_DIR}/../Dart
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Dart\\InstallPath]
${PROJECT_SOURCE_DIR}
/usr/share
C:/
"C:/Program Files"
${PROJECT_SOURCE_DIR}/..
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Dart\\InstallPath]
ENV ProgramFiles
PATH_SUFFIXES
Dart
DOC "If you have Dart installed, where is it located?"
)
......
......@@ -53,19 +53,19 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
HINTS
$ENV{FREETYPE_DIR}/include/freetype2
ENV FREETYPE_DIR
PATHS
/usr/local/X11R6/include
/usr/local/X11/include
/usr/freeware/include
PATH_SUFFIXES freetype2
/usr/local/X11R6
/usr/local/X11
/usr/freeware
PATH_SUFFIXES include/freetype2 include
)
find_library(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
HINTS
ENV FREETYPE_DIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
/usr/local/X11R6
/usr/local/X11
......
......@@ -91,7 +91,7 @@ find_library(GDAL_LIBRARY
ENV GDAL_DIR
ENV GDAL_ROOT
${_gdal_libpath}
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
/sw
/opt/local
......
......@@ -42,7 +42,7 @@ find_library(GIF_LIBRARY
NAMES ${POTENTIAL_GIF_LIBS}
HINTS
ENV GIF_DIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/usr/freeware
......
......@@ -172,7 +172,7 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
sigc++-2.0
)
set(_suffixes)
set(_suffixes include lib)
foreach(_d ${_relatives})
list(APPEND _suffixes ${_d})
list(APPEND _suffixes ${_d}/include) # for /usr/lib/gtk-2.0/include
......@@ -186,23 +186,15 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
find_path(${_var} ${_hdr}
PATHS
/usr/local/lib64
/usr/local/lib
/usr/lib64
/usr/lib
/opt/gnome/include
/opt/gnome/lib
/opt/openwin/include
/usr/openwin/lib
/sw/include
/sw/lib
/opt/local/include
/opt/local/lib
$ENV{GTKMM_BASEPATH}/include
$ENV{GTKMM_BASEPATH}/lib
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/include
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/include
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib
/opt/gnome
/opt/openwin
/usr/openwin
/sw
/opt/local
ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
PATH_SUFFIXES
${_suffixes}
)
......
......@@ -41,7 +41,7 @@ find_library(LUA_LIBRARY_lua
NAMES lua50 lua5.0 lua-5.0 lua5 lua
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
......@@ -61,7 +61,7 @@ else()
HINTS
ENV LUALIB_DIR
ENV LUA_DIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
/sw
/opt/local
......
......@@ -42,7 +42,7 @@ find_library(LUA_LIBRARY
NAMES lua51 lua5.1 lua-5.1 lua
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
......
......@@ -87,7 +87,7 @@ find_library(OPENTHREADS_LIBRARY
/opt/csw
/opt
/usr/freeware
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
)
find_library(OPENTHREADS_LIBRARY_DEBUG
......@@ -107,7 +107,7 @@ find_library(OPENTHREADS_LIBRARY_DEBUG
/opt/csw
/opt
/usr/freeware
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
)
if(OPENTHREADS_LIBRARY_DEBUG)
......
......@@ -40,7 +40,7 @@ find_library(PHYSFS_LIBRARY
NAMES physfs
HINTS
ENV PHYSFSDIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
......
......@@ -65,7 +65,7 @@ find_library(PRODUCER_LIBRARY
ENV PRODUCER_DIR
ENV OSG_DIR
ENV OSGDIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
/sw
/opt/local
......
......@@ -91,17 +91,18 @@ if (QT_MT_REQUIRED)
qt-mt qt-mt${qt_version_str_lib} qt-mtnc${qt_version_str_lib}
qt-mtedu${qt_version_str_lib} qt-mt230nc qt-mtnc321 qt-mt3
PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
$ENV{QTDIR}/lib
${GLOB_PATHS_LIB}
/usr/local/qt/lib
/usr/lib/qt/lib
/usr/lib/qt3/lib
/usr/lib/qt3/lib64
/usr/share/qt3/lib
C:/Progra~1/qt/lib
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]"
ENV QTDIR
${GLOB_PATHS_LIB}
/usr/local/qt
/usr/lib/qt
/usr/lib/qt3
/usr/share/qt3
C:/Progra~1/qt
PATH_SUFFIXES
lib
)
else ()
......@@ -111,17 +112,18 @@ else ()
qt-mt qt-mt${qt_version_str_lib} qt-mtnc${qt_version_str_lib}
qt-mtedu${qt_version_str_lib} qt-mt230nc qt-mtnc321 qt-mt3
PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
$ENV{QTDIR}/lib
${GLOB_PATHS_LIB}
/usr/local/qt/lib
/usr/lib/qt/lib
/usr/lib/qt3/lib
/usr/lib/qt3/lib64
/usr/share/qt3/lib
C:/Progra~1/qt/lib
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]"
ENV QTDIR
${GLOB_PATHS_LIB}
/usr/local/qt
/usr/lib/qt
/usr/lib/qt3
/usr/share/qt3
C:/Progra~1/qt/lib
PATH_SUFFIXES
lib
)
endif ()
......@@ -129,35 +131,37 @@ endif ()
find_library(QT_QASSISTANTCLIENT_LIBRARY
NAMES qassistantclient
PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
$ENV{QTDIR}/lib
${GLOB_PATHS_LIB}
/usr/local/qt/lib
/usr/lib/qt3/lib
/usr/lib/qt3/lib64
/usr/share/qt3/lib
C:/Progra~1/qt/lib
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]"
ENV QTDIR
${GLOB_PATHS_LIB}
/usr/local/qt
/usr/lib/qt3
/usr/share/qt3
C:/Progra~1/qt
PATH_SUFFIXES
lib
)
# qt 3 should prefer QTDIR over the PATH
find_program(QT_MOC_EXECUTABLE
NAMES moc-qt3 moc
HINTS
$ENV{QTDIR}/bin
ENV QTDIR
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
/usr/lib/qt3/bin
/usr/share/qt3/bin
C:/Progra~1/qt/bin
/usr/X11R6/bin
/usr/local/qt
/usr/lib/qt
/usr/lib/qt3
/usr/share/qt3
C:/Progra~1/qt
/usr/X11R6
PATH_SUFFIXES
bin
)
if(QT_MOC_EXECUTABLE)
......@@ -168,18 +172,20 @@ endif()
find_program(QT_UIC_EXECUTABLE
NAMES uic-qt3 uic
HINTS
$ENV{QTDIR}/bin
ENV QTDIR
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"
${GLOB_PATHS_BIN}
/usr/local/qt/bin
/usr/lib/qt/bin
/usr/lib/qt3/bin
/usr/share/qt3/bin
C:/Progra~1/qt/bin
/usr/X11R6/bin
/usr/local/qt
/usr/lib/qt
/usr/lib/qt3
/usr/share/qt3
C:/Progra~1/qt
/usr/X11R6
PATH_SUFFIXES
bin
)
if(QT_UIC_EXECUTABLE)
......@@ -189,13 +195,15 @@ endif()
if (WIN32)
find_library(QT_QTMAIN_LIBRARY qtmain
HINTS
$ENV{QTDIR}/lib
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
ENV QTDIR
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]"
PATHS
"$ENV{ProgramFiles}/qt/lib"
"C:/Program Files/qt/lib"
"$ENV{ProgramFiles}/qt"
"C:/Program Files/qt"
PATH_SUFFIXES
lib
DOC "This Library is only needed by and included with Qt3 on MSWindows. It should be NOTFOUND, undefined or IGNORE otherwise."
)
endif ()
......
......@@ -22,24 +22,18 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# QuickTime on OS X looks different than QuickTime for Windows,
# so I am going to case the two.
if(APPLE)
find_path(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h)
find_library(QUICKTIME_LIBRARY QuickTime)
else()
find_path(QUICKTIME_INCLUDE_DIR QuickTime.h
HINTS
$ENV{QUICKTIME_DIR}/include
ENV QUICKTIME_DIR
)
find_library(QUICKTIME_LIBRARY QuickTime
HINTS
$ENV{QUICKTIME_DIR}/lib
ENV QUICKTIME_DIR
)
endif()
find_path(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h QuickTime.h
HINTS
ENV QUICKTIME_DIR
PATH_SUFFIXES
include
)
find_library(QUICKTIME_LIBRARY QuickTime
HINTS
ENV QUICKTIME_DIR
PATH_SUFFIXES
lib
)
# handle the QUIETLY and REQUIRED arguments and set QUICKTIME_FOUND to TRUE if
# all listed variables are TRUE
......
......@@ -88,7 +88,7 @@ find_library(SDL_LIBRARY_TEMP
NAMES SDL SDL-1.1
HINTS
ENV SDLDIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
/sw
/opt/local
......@@ -106,7 +106,7 @@ if(NOT SDL_BUILDING_LIBRARY)
NAMES SDLmain SDLmain-1.1
HINTS
ENV SDLDIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
/sw
/opt/local
......
......@@ -29,24 +29,18 @@ find_path(SDLIMAGE_INCLUDE_DIR SDL_image.h
HINTS
ENV SDLIMAGEDIR
ENV SDLDIR
PATH_SUFFIXES include
PATH_SUFFIXES include include/SDL
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local/include/SDL
/usr/include/SDL
/usr/local/include/SDL12
/usr/local/include/SDL11 # FreeBSD ports
/usr/include/SDL12
/usr/include/SDL11
/sw/include/SDL # Fink
/sw/include
/opt/local/include/SDL # DarwinPorts
/opt/local/include
/opt/csw/include/SDL # Blastwave
/opt/csw/include
/opt/include/SDL
/opt/include
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(SDLIMAGE_LIBRARY
......@@ -54,7 +48,7 @@ find_library(SDLIMAGE_LIBRARY
HINTS
ENV SDLIMAGEDIR
ENV SDLDIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
......
......@@ -29,24 +29,18 @@ find_path(SDLMIXER_INCLUDE_DIR SDL_mixer.h
HINTS
ENV SDLMIXERDIR
ENV SDLDIR
PATH_SUFFIXES include
PATH_SUFFIXES include include/SDL
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local/include/SDL
/usr/include/SDL
/usr/local/include/SDL12
/usr/local/include/SDL11 # FreeBSD ports
/usr/include/SDL12
/usr/include/SDL11
/sw/include/SDL # Fink
/sw/include
/opt/local/include/SDL # DarwinPorts
/opt/local/include
/opt/csw/include/SDL # Blastwave
/opt/csw/include
/opt/include/SDL
/opt/include
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(SDLMIXER_LIBRARY
......@@ -54,7 +48,7 @@ find_library(SDLMIXER_LIBRARY
HINTS
ENV SDLMIXERDIR
ENV SDLDIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
......
......@@ -29,31 +29,25 @@ find_path(SDLNET_INCLUDE_DIR SDL_net.h
HINTS
ENV SDLNETDIR
ENV SDLDIR
PATH_SUFFIXES include
PATH_SUFFIXES include include/SDL
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local/include/SDL
/usr/include/SDL
/usr/local/include/SDL12
/usr/local/include/SDL11 # FreeBSD ports
/usr/include/SDL12
/usr/include/SDL11
/sw/include/SDL # Fink
/sw/include
/opt/local/include/SDL # DarwinPorts
/opt/local/include
/opt/csw/include/SDL # Blastwave
/opt/csw/include
/opt/include/SDL
/opt/include
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(SDLNET_LIBRARY
NAMES SDL_net
HINTS
ENV SDLNETDIR
ENV SDLDIR
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
......
......@@ -75,39 +75,33 @@ mark_as_advanced(SDL_SOUND_EXTRAS)
# Find SDL_sound.h
find_path(SDL_SOUND_INCLUDE_DIR SDL_sound.h
HINTS
$ENV{SDLSOUNDDIR}/include
ENV SDLSOUNDDIR
$ENV{SDLDIR}/include
ENV SDLDIR
PATH_SUFFIXES
include include/SDL
PATHS
/usr/local/include/SDL
/usr/include/SDL
/usr/local/include/SDL12
/usr/local/include/SDL11 # FreeBSD ports
/usr/include/SDL12
/usr/include/SDL11
/sw/include/SDL # Fink
/sw/include
/opt/local/include/SDL # DarwinPorts
/opt/local/include
/opt/csw/include/SDL # Blastwave
/opt/csw/include
/opt/include/SDL
/opt/include
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(SDL_SOUND_LIBRARY
NAMES SDL_sound
HINTS
$ENV{SDLSOUNDDIR}/lib
ENV SDLSOUNDDIR
$ENV{SDLDIR}/lib
ENV SDLDIR
PATH_SUFFIXES
lib
PATHS
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/sw
/opt/local
/opt/csw
/opt
)
if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
......@@ -212,37 +206,35 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
find_library(MIKMOD_LIBRARY
NAMES libmikmod-coreaudio mikmod
PATHS
$ENV{MIKMODDIR}/lib
ENV MIKMODDIR
$ENV{SDLSOUNDDIR}/lib
ENV SDLSOUNDDIR
$ENV{SDLDIR}/lib
ENV SDLDIR
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES
lib
)
if(MIKMOD_LIBRARY)
set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MIKMOD_LIBRARY})
endif()
endif()
endif(MIKMOD_LIBRARY)
endif("${MY_OUTPUT}" MATCHES "MikMod_")
# Find ModPlug
if("${MY_OUTPUT}" MATCHES "MODPLUG_")
find_library(MODPLUG_LIBRARY
NAMES modplug
PATHS
$ENV{MODPLUGDIR}/lib
ENV MODPLUGDIR
$ENV{SDLSOUNDDIR}/lib
ENV SDLSOUNDDIR
$ENV{SDLDIR}/lib
ENV SDLDIR
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES
lib
)
if(MODPLUG_LIBRARY)
set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MODPLUG_LIBRARY})
......@@ -255,18 +247,16 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
find_library(VORBIS_LIBRARY
NAMES vorbis Vorbis VORBIS
PATHS
$ENV{VORBISDIR}/lib
ENV VORBISDIR
$ENV{OGGDIR}/lib
ENV OGGDIR
$ENV{SDLSOUNDDIR}/lib
ENV SDLSOUNDDIR
$ENV{SDLDIR}/lib
ENV SDLDIR
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES
lib
)
if(VORBIS_LIBRARY)
set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${VORBIS_LIBRARY})
......@@ -275,18 +265,16 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
find_library(OGG_LIBRARY
NAMES ogg Ogg OGG
PATHS
$ENV{OGGDIR}/lib
ENV OGGDIR
$ENV{VORBISDIR}/lib
ENV VORBISDIR
$ENV{SDLSOUNDDIR}/lib
ENV SDLSOUNDDIR
$ENV{SDLDIR}/lib
ENV SDLDIR
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES
lib
)
if(OGG_LIBRARY)
set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
......@@ -299,16 +287,15 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
find_library(SMPEG_LIBRARY
NAMES smpeg SMPEG Smpeg SMpeg
PATHS
$ENV{SMPEGDIR}/lib
ENV SMPEGDIR
$ENV{SDLSOUNDDIR}/lib
ENV SDLSOUNDDIR
$ENV{SDLDIR}/lib
ENV SDLDIR
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES
lib
)
if(SMPEG_LIBRARY)
set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SMPEG_LIBRARY})
......@@ -321,16 +308,15 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
find_library(FLAC_LIBRARY
NAMES flac FLAC
PATHS
$ENV{FLACDIR}/lib
ENV FLACDIR
$ENV{SDLSOUNDDIR}/lib
ENV SDLSOUNDDIR
$ENV{SDLDIR}/lib
ENV SDLDIR
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES
lib
)
if(FLAC_LIBRARY)
set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${FLAC_LIBRARY})
......@@ -346,16 +332,15 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
find_library(SPEEX_LIBRARY
NAMES speex SPEEX
PATHS
$ENV{SPEEXDIR}/lib
ENV SPEEXDIR
$ENV{SDLSOUNDDIR}/lib
ENV SDLSOUNDDIR
$ENV{SDLDIR}/lib
ENV SDLDIR
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES
lib
)
if(SPEEX_LIBRARY)
set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SPEEX_LIBRARY})
......@@ -367,20 +352,16 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
find_library(OGG_LIBRARY
NAMES ogg Ogg OGG
PATHS
$ENV{OGGDIR}/lib
ENV OGGDIR
$ENV{VORBISDIR}/lib
ENV VORBISDIR
$ENV{SPEEXDIR}/lib
ENV SPEEXDIR
$ENV{SDLSOUNDDIR}/lib
ENV SDLSOUNDDIR
$ENV{SDLDIR}/lib
ENV SDLDIR
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib
)
if(OGG_LIBRARY)
set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
......
......@@ -29,24 +29,18 @@ find_path(SDLTTF_INCLUDE_DIR SDL_ttf.h
HINTS
ENV SDLTTFDIR
ENV SDLDIR
PATH_SUFFIXES include
PATH_SUFFIXES include include/SDL
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local/include/SDL
/usr/include/SDL
/usr/local/include/SDL12
/usr/local/include/SDL11 # FreeBSD ports
/usr/include/SDL12
/usr/include/SDL11
/sw/include/SDL # Fink
/sw/include