diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-03-28 22:00:54 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-08-14 19:02:58 (GMT) |
commit | b04650e163320353762b6ec196afa9500345b5cd (patch) | |
tree | 1790b38ae7db75f232a27f4aa796d4441c68f009 /Modules | |
parent | cd3bd23266a4a6c00595134a17a8bdaea9e28af5 (diff) | |
download | CMake-b04650e163320353762b6ec196afa9500345b5cd.zip CMake-b04650e163320353762b6ec196afa9500345b5cd.tar.gz CMake-b04650e163320353762b6ec196afa9500345b5cd.tar.bz2 |
use the find_* functions ENV parameter
Instead of directly passing $ENV{SOMEVAR} to a find_* call pass in ENV SOMEVAR.
This will make sure the paths will get correctly handled through different
platforms, especially on Windows.
Also fixes one place where paths with windows delimiters (\) were hardcoded to
use forward slashes.
Diffstat (limited to 'Modules')
28 files changed, 149 insertions, 151 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index f152437..6a6be47 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -650,9 +650,11 @@ endif() # Look for the SDK stuff. As of CUDA 3.0 NVSDKCUDA_ROOT has been replaced with # NVSDKCOMPUTE_ROOT with the old CUDA C contents moved into the C subdirectory find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h + HINTS "$ENV{NVSDKCOMPUTE_ROOT}/C" - "$ENV{NVSDKCUDA_ROOT}" + ENV NVSDKCUDA_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Installed Products\\NVIDIA SDK 10\\Compute;InstallDir]" + PATHS "/Developer/GPU\ Computing/C" ) diff --git a/Modules/FindDart.cmake b/Modules/FindDart.cmake index 13e19be..b6ea9e0 100644 --- a/Modules/FindDart.cmake +++ b/Modules/FindDart.cmake @@ -17,7 +17,9 @@ # License text for the above reference.) find_path(DART_ROOT README.INSTALL - $ENV{DART_ROOT} + HINTS + ENV DART_ROOT + PATHS ${PROJECT_SOURCE_DIR}/Dart /usr/share/Dart C:/Dart diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake index a02d031..24cfb87 100644 --- a/Modules/FindFLTK.cmake +++ b/Modules/FindFLTK.cmake @@ -93,11 +93,13 @@ if(NOT FLTK_DIR) # find_path(FLTK_DIR FLTKConfig.cmake # Look for an environment variable FLTK_DIR. - $ENV{FLTK_DIR} + HINTS + ENV FLTK_DIR # Look in places relative to the system executable search path. ${FLTK_DIR_SEARCH} + PATHS # Look in standard UNIX install locations. /usr/local/lib/fltk /usr/lib/fltk diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake index 3ea558c..071c318 100644 --- a/Modules/FindFLTK2.cmake +++ b/Modules/FindFLTK2.cmake @@ -73,7 +73,7 @@ if(NOT FLTK2_DIR) # find_path(FLTK2_DIR FLTK2Config.cmake # Look for an environment variable FLTK2_DIR. - $ENV{FLTK2_DIR} + ENV FLTK2_DIR # Look in places relative to the system executable search path. ${FLTK2_DIR_SEARCH} diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 08b4a0d..69511b4 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -44,7 +44,7 @@ # everything still works. find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h HINTS - $ENV{FREETYPE_DIR} + ENV FREETYPE_DIR PATHS /usr/local/X11R6/include /usr/local/X11/include @@ -64,7 +64,7 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h find_library(FREETYPE_LIBRARY NAMES freetype libfreetype freetype219 HINTS - $ENV{FREETYPE_DIR} + ENV FREETYPE_DIR PATH_SUFFIXES lib64 lib PATHS /usr/local/X11R6 diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake index 1e09b82..b620ab1 100644 --- a/Modules/FindGDAL.cmake +++ b/Modules/FindGDAL.cmake @@ -42,8 +42,8 @@ find_path(GDAL_INCLUDE_DIR gdal.h HINTS - $ENV{GDAL_DIR} - $ENV{GDAL_ROOT} + ENV GDAL_DIR + ENV GDAL_ROOT PATH_SUFFIXES include/gdal include/GDAL @@ -64,8 +64,8 @@ if(UNIX) # libgdal.so... find_program(GDAL_CONFIG gdal-config HINTS - $ENV{GDAL_DIR} - $ENV{GDAL_ROOT} + ENV GDAL_DIR + ENV GDAL_ROOT PATH_SUFFIXES bin PATHS /sw # Fink @@ -88,8 +88,8 @@ endif() find_library(GDAL_LIBRARY NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL HINTS - $ENV{GDAL_DIR} - $ENV{GDAL_ROOT} + ENV GDAL_DIR + ENV GDAL_ROOT ${_gdal_libpath} PATH_SUFFIXES lib64 lib PATHS diff --git a/Modules/FindGIF.cmake b/Modules/FindGIF.cmake index ff1d396..c8f0b43 100644 --- a/Modules/FindGIF.cmake +++ b/Modules/FindGIF.cmake @@ -28,7 +28,7 @@ find_path(GIF_INCLUDE_DIR gif_lib.h HINTS - $ENV{GIF_DIR} + ENV GIF_DIR PATH_SUFFIXES include PATHS ~/Library/Frameworks @@ -41,7 +41,7 @@ set(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib giflib4) find_library(GIF_LIBRARY NAMES ${POTENTIAL_GIF_LIBS} HINTS - $ENV{GIF_DIR} + ENV GIF_DIR PATH_SUFFIXES lib64 lib PATHS ~/Library/Frameworks diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index 6cffb5c..d531dd1 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -98,7 +98,7 @@ function(_gtest_find_library _name) find_library(${_name} NAMES ${ARGN} HINTS - $ENV{GTEST_ROOT} + ENV GTEST_ROOT ${GTEST_ROOT} PATH_SUFFIXES ${_gtest_libpath_suffixes} ) diff --git a/Modules/FindLua50.cmake b/Modules/FindLua50.cmake index 2b8ee97..21a86db 100644 --- a/Modules/FindLua50.cmake +++ b/Modules/FindLua50.cmake @@ -26,7 +26,7 @@ find_path(LUA_INCLUDE_DIR lua.h HINTS - $ENV{LUA_DIR} + ENV LUA_DIR PATH_SUFFIXES include/lua50 include/lua5.0 include/lua5 include/lua include PATHS ~/Library/Frameworks @@ -40,7 +40,7 @@ find_path(LUA_INCLUDE_DIR lua.h find_library(LUA_LIBRARY_lua NAMES lua50 lua5.0 lua-5.0 lua5 lua HINTS - $ENV{LUA_DIR} + ENV LUA_DIR PATH_SUFFIXES lib64 lib PATHS ~/Library/Frameworks @@ -59,8 +59,8 @@ else() find_library(LUA_LIBRARY_lualib NAMES lualib50 lualib5.0 lualib5 lualib HINTS - $ENV{LUALIB_DIR} - $ENV{LUA_DIR} + ENV LUALIB_DIR + ENV LUA_DIR PATH_SUFFIXES lib64 lib PATHS /sw diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake index b5a5471..87631f7 100644 --- a/Modules/FindLua51.cmake +++ b/Modules/FindLua51.cmake @@ -27,7 +27,7 @@ find_path(LUA_INCLUDE_DIR lua.h HINTS - $ENV{LUA_DIR} + ENV LUA_DIR PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include PATHS ~/Library/Frameworks @@ -41,7 +41,7 @@ find_path(LUA_INCLUDE_DIR lua.h find_library(LUA_LIBRARY NAMES lua51 lua5.1 lua-5.1 lua HINTS - $ENV{LUA_DIR} + ENV LUA_DIR PATH_SUFFIXES lib64 lib PATHS ~/Library/Frameworks diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake index 311a11a..78fd632 100644 --- a/Modules/FindOpenAL.cmake +++ b/Modules/FindOpenAL.cmake @@ -63,7 +63,7 @@ find_path(OPENAL_INCLUDE_DIR al.h HINTS - $ENV{OPENALDIR} + ENV OPENALDIR PATH_SUFFIXES include/AL include/OpenAL include PATHS ~/Library/Frameworks @@ -78,7 +78,7 @@ find_path(OPENAL_INCLUDE_DIR al.h find_library(OPENAL_LIBRARY NAMES OpenAL al openal OpenAL32 HINTS - $ENV{OPENALDIR} + ENV OPENALDIR PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64 PATHS ~/Library/Frameworks diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake index 4f6e920..9dc85ec 100644 --- a/Modules/FindOpenThreads.cmake +++ b/Modules/FindOpenThreads.cmake @@ -54,13 +54,13 @@ find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread HINTS # enough environment variables? - $ENV{OPENTHREADS_INCLUDE_DIR} - $ENV{OPENTHREADS_DIR} - $ENV{OSG_INCLUDE_DIR} - $ENV{OSG_DIR} - $ENV{OSGDIR} - $ENV{OpenThreads_ROOT} - $ENV{OSG_ROOT} + ENV OPENTHREADS_INCLUDE_DIR + ENV OPENTHREADS_DIR + ENV OSG_INCLUDE_DIR + ENV OSG_DIR + ENV OSGDIR + ENV OpenThreads_ROOT + ENV OSG_ROOT PATHS /sw # Fink /opt/local # DarwinPorts @@ -74,13 +74,13 @@ find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread find_library(OPENTHREADS_LIBRARY NAMES OpenThreads OpenThreadsWin32 HINTS - $ENV{OPENTHREADS_LIBRARY_DIR} - $ENV{OPENTHREADS_DIR} - $ENV{OSG_LIBRARY_DIR} - $ENV{OSG_DIR} - $ENV{OSGDIR} - $ENV{OpenThreads_ROOT} - $ENV{OSG_ROOT} + ENV OPENTHREADS_LIBRARY_DIR + ENV OPENTHREADS_DIR + ENV OSG_LIBRARY_DIR + ENV OSG_DIR + ENV OSGDIR + ENV OpenThreads_ROOT + ENV OSG_ROOT PATHS /sw /opt/local @@ -93,14 +93,14 @@ find_library(OPENTHREADS_LIBRARY find_library(OPENTHREADS_LIBRARY_DEBUG NAMES OpenThreadsd OpenThreadsWin32d HINTS - $ENV{OPENTHREADS_DEBUG_LIBRARY_DIR} - $ENV{OPENTHREADS_LIBRARY_DIR} - $ENV{OPENTHREADS_DIR} - $ENV{OSG_LIBRARY_DIR} - $ENV{OSG_DIR} - $ENV{OSGDIR} - $ENV{OpenThreads_ROOT} - $ENV{OSG_ROOT} + ENV OPENTHREADS_DEBUG_LIBRARY_DIR + ENV OPENTHREADS_LIBRARY_DIR + ENV OPENTHREADS_DIR + ENV OSG_LIBRARY_DIR + ENV OSG_DIR + ENV OSGDIR + ENV OpenThreads_ROOT + ENV OSG_ROOT PATHS /sw /opt/local diff --git a/Modules/FindPhysFS.cmake b/Modules/FindPhysFS.cmake index ae78b27..36fbfd1 100644 --- a/Modules/FindPhysFS.cmake +++ b/Modules/FindPhysFS.cmake @@ -25,7 +25,7 @@ find_path(PHYSFS_INCLUDE_DIR physfs.h HINTS - $ENV{PHYSFSDIR} + ENV PHYSFSDIR PATH_SUFFIXES include/physfs include PATHS ~/Library/Frameworks @@ -39,7 +39,7 @@ find_path(PHYSFS_INCLUDE_DIR physfs.h find_library(PHYSFS_LIBRARY NAMES physfs HINTS - $ENV{PHYSFSDIR} + ENV PHYSFSDIR PATH_SUFFIXES lib64 lib PATHS ~/Library/Frameworks diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake index 699cd41..b9440a8 100644 --- a/Modules/FindPostgreSQL.cmake +++ b/Modules/FindPostgreSQL.cmake @@ -74,11 +74,6 @@ set(PostgreSQL_LIBRARY_DIR_MESSAGE "Set the PostgreSQL_LIBRARY_DIR cmake cache e set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to where PostgreSQL is found on the machine E.g C:/Program Files/PostgreSQL/8.4") -set(PostgreSQL_ROOT_DIRECTORIES $ENV{PostgreSQL_ROOT}) -if(PostgreSQL_ROOT_DIRECTORIES) - file(TO_CMAKE_PATH ${PostgreSQL_ROOT_DIRECTORIES} PostgreSQL_ROOT_DIRECTORIES) -endif() - set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS} "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") @@ -89,7 +84,7 @@ if ( WIN32 ) endforeach() endif() set( PostgreSQL_ROOT_DIRECTORIES - ${PostgreSQL_ROOT_DIRECTORIES} + ENV PostgreSQL_ROOT ${PostgreSQL_ROOT} ${PostgreSQL_ADDITIONAL_SEARCH_PATHS} ) diff --git a/Modules/FindProducer.cmake b/Modules/FindProducer.cmake index 20266cb..0de8532 100644 --- a/Modules/FindProducer.cmake +++ b/Modules/FindProducer.cmake @@ -44,9 +44,9 @@ # Try the user's environment request before anything else. find_path(PRODUCER_INCLUDE_DIR Producer/CameraGroup HINTS - $ENV{PRODUCER_DIR} - $ENV{OSG_DIR} - $ENV{OSGDIR} + ENV PRODUCER_DIR + ENV OSG_DIR + ENV OSGDIR PATH_SUFFIXES include PATHS ~/Library/Frameworks @@ -62,9 +62,9 @@ find_path(PRODUCER_INCLUDE_DIR Producer/CameraGroup find_library(PRODUCER_LIBRARY NAMES Producer HINTS - $ENV{PRODUCER_DIR} - $ENV{OSG_DIR} - $ENV{OSGDIR} + ENV PRODUCER_DIR + ENV OSG_DIR + ENV OSGDIR PATH_SUFFIXES lib64 lib PATHS /sw diff --git a/Modules/FindQuickTime.cmake b/Modules/FindQuickTime.cmake index 57de737..e4ade51 100644 --- a/Modules/FindQuickTime.cmake +++ b/Modules/FindQuickTime.cmake @@ -32,12 +32,12 @@ else() find_path(QUICKTIME_INCLUDE_DIR QuickTime.h HINTS $ENV{QUICKTIME_DIR}/include - $ENV{QUICKTIME_DIR} + ENV QUICKTIME_DIR ) find_library(QUICKTIME_LIBRARY QuickTime HINTS $ENV{QUICKTIME_DIR}/lib - $ENV{QUICKTIME_DIR} + ENV QUICKTIME_DIR ) endif() diff --git a/Modules/FindRTI.cmake b/Modules/FindRTI.cmake index eef0dae..60990b7 100644 --- a/Modules/FindRTI.cmake +++ b/Modules/FindRTI.cmake @@ -35,18 +35,13 @@ macro(RTI_MESSAGE_QUIETLY QUIET TYPE MSG) endif() endmacro() -# Detect the CERTI installation, http://www.cert.fr/CERTI -if ("$ENV{CERTI_HOME}" STRGREATER "") - file(TO_CMAKE_PATH "$ENV{CERTI_HOME}" CERTI_HOME) - RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "Using environment defined CERTI_HOME: ${CERTI_HOME}") -endif () - set(RTI_DEFINITIONS "-DRTI_USES_STD_FSTREAM") +# Detect the CERTI installation, http://www.cert.fr/CERTI # Detect the MAK Technologies RTI installation, http://www.mak.com/products/rti.php # note: the following list is ordered to find the most recent version first set(RTI_POSSIBLE_DIRS - ${CERTI_HOME} + ENV CERTI_HOME "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MAK Technologies\\MAK RTI 3.2 MSVC++ 8.0;Location]" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MAK RTI 3.2-win32-msvc++8.0;InstallLocation]" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MAK Technologies\\MAK RTI 2.2;Location]" diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake index 806b659..bd36798 100644 --- a/Modules/FindSDL.cmake +++ b/Modules/FindSDL.cmake @@ -67,7 +67,7 @@ find_path(SDL_INCLUDE_DIR SDL.h HINTS - $ENV{SDLDIR} + ENV SDLDIR PATH_SUFFIXES include/SDL include PATHS ~/Library/Frameworks @@ -87,7 +87,7 @@ find_path(SDL_INCLUDE_DIR SDL.h find_library(SDL_LIBRARY_TEMP NAMES SDL SDL-1.1 HINTS - $ENV{SDLDIR} + ENV SDLDIR PATH_SUFFIXES lib64 lib PATHS /sw @@ -105,7 +105,7 @@ if(NOT SDL_BUILDING_LIBRARY) find_library(SDLMAIN_LIBRARY NAMES SDLmain SDLmain-1.1 HINTS - $ENV{SDLDIR} + ENV SDLDIR PATH_SUFFIXES lib64 lib PATHS /sw diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake index 3c1f7a0..170df07 100644 --- a/Modules/FindSDL_image.cmake +++ b/Modules/FindSDL_image.cmake @@ -27,8 +27,8 @@ find_path(SDLIMAGE_INCLUDE_DIR SDL_image.h HINTS - $ENV{SDLIMAGEDIR} - $ENV{SDLDIR} + ENV SDLIMAGEDIR + ENV SDLDIR PATH_SUFFIXES include PATHS ~/Library/Frameworks @@ -52,8 +52,8 @@ find_path(SDLIMAGE_INCLUDE_DIR SDL_image.h find_library(SDLIMAGE_LIBRARY NAMES SDL_image HINTS - $ENV{SDLIMAGEDIR} - $ENV{SDLDIR} + ENV SDLIMAGEDIR + ENV SDLDIR PATH_SUFFIXES lib64 lib PATHS ~/Library/Frameworks diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake index ed333ee..a3f24ec 100644 --- a/Modules/FindSDL_mixer.cmake +++ b/Modules/FindSDL_mixer.cmake @@ -27,8 +27,8 @@ find_path(SDLMIXER_INCLUDE_DIR SDL_mixer.h HINTS - $ENV{SDLMIXERDIR} - $ENV{SDLDIR} + ENV SDLMIXERDIR + ENV SDLDIR PATH_SUFFIXES include PATHS ~/Library/Frameworks @@ -52,8 +52,8 @@ find_path(SDLMIXER_INCLUDE_DIR SDL_mixer.h find_library(SDLMIXER_LIBRARY NAMES SDL_mixer HINTS - $ENV{SDLMIXERDIR} - $ENV{SDLDIR} + ENV SDLMIXERDIR + ENV SDLDIR PATH_SUFFIXES lib64 lib PATHS ~/Library/Frameworks diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake index dcab3fd..4597040 100644 --- a/Modules/FindSDL_net.cmake +++ b/Modules/FindSDL_net.cmake @@ -27,8 +27,8 @@ find_path(SDLNET_INCLUDE_DIR SDL_net.h HINTS - $ENV{SDLNETDIR} - $ENV{SDLDIR} + ENV SDLNETDIR + ENV SDLDIR PATH_SUFFIXES include PATHS ~/Library/Frameworks @@ -51,8 +51,8 @@ find_path(SDLNET_INCLUDE_DIR SDL_net.h find_library(SDLNET_LIBRARY NAMES SDL_net HINTS - $ENV{SDLNETDIR} - $ENV{SDLDIR} + ENV SDLNETDIR + ENV SDLDIR PATH_SUFFIXES lib64 lib PATHS ~/Library/Frameworks diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake index 3685956..cd9c3c05 100644 --- a/Modules/FindSDL_sound.cmake +++ b/Modules/FindSDL_sound.cmake @@ -76,9 +76,9 @@ mark_as_advanced(SDL_SOUND_EXTRAS) find_path(SDL_SOUND_INCLUDE_DIR SDL_sound.h HINTS $ENV{SDLSOUNDDIR}/include - $ENV{SDLSOUNDDIR} + ENV SDLSOUNDDIR $ENV{SDLDIR}/include - $ENV{SDLDIR} + ENV SDLDIR PATHS /usr/local/include/SDL /usr/include/SDL @@ -100,9 +100,9 @@ find_library(SDL_SOUND_LIBRARY NAMES SDL_sound HINTS $ENV{SDLSOUNDDIR}/lib - $ENV{SDLSOUNDDIR} + ENV SDLSOUNDDIR $ENV{SDLDIR}/lib - $ENV{SDLDIR} + ENV SDLDIR PATHS /sw/lib /opt/local/lib @@ -213,11 +213,11 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) NAMES libmikmod-coreaudio mikmod PATHS $ENV{MIKMODDIR}/lib - $ENV{MIKMODDIR} + ENV MIKMODDIR $ENV{SDLSOUNDDIR}/lib - $ENV{SDLSOUNDDIR} + ENV SDLSOUNDDIR $ENV{SDLDIR}/lib - $ENV{SDLDIR} + ENV SDLDIR /sw/lib /opt/local/lib /opt/csw/lib @@ -234,11 +234,11 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) NAMES modplug PATHS $ENV{MODPLUGDIR}/lib - $ENV{MODPLUGDIR} + ENV MODPLUGDIR $ENV{SDLSOUNDDIR}/lib - $ENV{SDLSOUNDDIR} + ENV SDLSOUNDDIR $ENV{SDLDIR}/lib - $ENV{SDLDIR} + ENV SDLDIR /sw/lib /opt/local/lib /opt/csw/lib @@ -256,13 +256,13 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) NAMES vorbis Vorbis VORBIS PATHS $ENV{VORBISDIR}/lib - $ENV{VORBISDIR} + ENV VORBISDIR $ENV{OGGDIR}/lib - $ENV{OGGDIR} + ENV OGGDIR $ENV{SDLSOUNDDIR}/lib - $ENV{SDLSOUNDDIR} + ENV SDLSOUNDDIR $ENV{SDLDIR}/lib - $ENV{SDLDIR} + ENV SDLDIR /sw/lib /opt/local/lib /opt/csw/lib @@ -276,13 +276,13 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) NAMES ogg Ogg OGG PATHS $ENV{OGGDIR}/lib - $ENV{OGGDIR} + ENV OGGDIR $ENV{VORBISDIR}/lib - $ENV{VORBISDIR} + ENV VORBISDIR $ENV{SDLSOUNDDIR}/lib - $ENV{SDLSOUNDDIR} + ENV SDLSOUNDDIR $ENV{SDLDIR}/lib - $ENV{SDLDIR} + ENV SDLDIR /sw/lib /opt/local/lib /opt/csw/lib @@ -300,11 +300,11 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) NAMES smpeg SMPEG Smpeg SMpeg PATHS $ENV{SMPEGDIR}/lib - $ENV{SMPEGDIR} + ENV SMPEGDIR $ENV{SDLSOUNDDIR}/lib - $ENV{SDLSOUNDDIR} + ENV SDLSOUNDDIR $ENV{SDLDIR}/lib - $ENV{SDLDIR} + ENV SDLDIR /sw/lib /opt/local/lib /opt/csw/lib @@ -322,11 +322,11 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) NAMES flac FLAC PATHS $ENV{FLACDIR}/lib - $ENV{FLACDIR} + ENV FLACDIR $ENV{SDLSOUNDDIR}/lib - $ENV{SDLSOUNDDIR} + ENV SDLSOUNDDIR $ENV{SDLDIR}/lib - $ENV{SDLDIR} + ENV SDLDIR /sw/lib /opt/local/lib /opt/csw/lib @@ -347,11 +347,11 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) NAMES speex SPEEX PATHS $ENV{SPEEXDIR}/lib - $ENV{SPEEXDIR} + ENV SPEEXDIR $ENV{SDLSOUNDDIR}/lib - $ENV{SDLSOUNDDIR} + ENV SDLSOUNDDIR $ENV{SDLDIR}/lib - $ENV{SDLDIR} + ENV SDLDIR /sw/lib /opt/local/lib /opt/csw/lib @@ -368,15 +368,15 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) NAMES ogg Ogg OGG PATHS $ENV{OGGDIR}/lib - $ENV{OGGDIR} + ENV OGGDIR $ENV{VORBISDIR}/lib - $ENV{VORBISDIR} + ENV VORBISDIR $ENV{SPEEXDIR}/lib - $ENV{SPEEXDIR} + ENV SPEEXDIR $ENV{SDLSOUNDDIR}/lib - $ENV{SDLSOUNDDIR} + ENV SDLSOUNDDIR $ENV{SDLDIR}/lib - $ENV{SDLDIR} + ENV SDLDIR /sw/lib /opt/local/lib /opt/csw/lib diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake index 6f238e6..0258eed 100644 --- a/Modules/FindSDL_ttf.cmake +++ b/Modules/FindSDL_ttf.cmake @@ -27,8 +27,8 @@ find_path(SDLTTF_INCLUDE_DIR SDL_ttf.h HINTS - $ENV{SDLTTFDIR} - $ENV{SDLDIR} + ENV SDLTTFDIR + ENV SDLDIR PATH_SUFFIXES include PATHS ~/Library/Frameworks @@ -52,8 +52,8 @@ find_path(SDLTTF_INCLUDE_DIR SDL_ttf.h find_library(SDLTTF_LIBRARY NAMES SDL_ttf HINTS - $ENV{SDLTTFDIR} - $ENV{SDLDIR} + ENV SDLTTFDIR + ENV SDLDIR PATHS ~/Library/Frameworks /Library/Frameworks diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake index b44ba70..a032496 100644 --- a/Modules/FindSquish.cmake +++ b/Modules/FindSquish.cmake @@ -54,8 +54,9 @@ if(NOT SQUISH_INSTALL_DIR) # Look for an installation find_path(SQUISH_INSTALL_DIR bin/squishrunner + HINTS # Look for an environment variable SQUISH_INSTALL_DIR. - $ENV{SQUISH_INSTALL_DIR} + ENV SQUISH_INSTALL_DIR # Look in places relative to the system executable search path. ${SQUISH_INSTALL_DIR_SEARCH} diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake index b60845d..fa090ff 100644 --- a/Modules/FindVTK.cmake +++ b/Modules/FindVTK.cmake @@ -90,7 +90,7 @@ if(_VTK_40_ALLOW AND NOT VTK_DIR) find_path(VTK_DIR NAMES UseVTK.cmake PATH_SUFFIXES vtk-4.0 vtk - HINTS $ENV{VTK_DIR} + HINTS ENV VTK_DIR PATHS diff --git a/Modules/Findosg_functions.cmake b/Modules/Findosg_functions.cmake index 30c0876..e9a777d 100644 --- a/Modules/Findosg_functions.cmake +++ b/Modules/Findosg_functions.cmake @@ -26,10 +26,10 @@ function(OSG_FIND_PATH module header) # Try the user's environment request before anything else. find_path(${module_uc}_INCLUDE_DIR ${header} HINTS - $ENV{${module_uc}_DIR} - $ENV{OSG_DIR} - $ENV{OSGDIR} - $ENV{OSG_ROOT} + ENV ${module_uc}_DIR + ENV OSG_DIR + ENV OSGDIR + ENV OSG_ROOT PATH_SUFFIXES include PATHS /sw # Fink @@ -50,10 +50,10 @@ function(OSG_FIND_LIBRARY module library) find_library(${module_uc}_LIBRARY NAMES ${library} HINTS - $ENV{${module_uc}_DIR} - $ENV{OSG_DIR} - $ENV{OSGDIR} - $ENV{OSG_ROOT} + ENV ${module_uc}_DIR + ENV OSG_DIR + ENV OSGDIR + ENV OSG_ROOT PATH_SUFFIXES lib64 lib PATHS /sw # Fink @@ -66,10 +66,10 @@ function(OSG_FIND_LIBRARY module library) find_library(${module_uc}_LIBRARY_DEBUG NAMES ${library}d HINTS - $ENV{${module_uc}_DIR} - $ENV{OSG_DIR} - $ENV{OSGDIR} - $ENV{OSG_ROOT} + ENV ${module_uc}_DIR + ENV OSG_DIR + ENV OSGDIR + ENV OSG_ROOT PATH_SUFFIXES lib64 lib PATHS /sw # Fink diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index c186eb5..218d476 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -421,12 +421,12 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") find_path(wxWidgets_ROOT_DIR NAMES include/wx/wx.h PATHS - $ENV{wxWidgets_ROOT_DIR} - $ENV{WXWIN} + ENV wxWidgets_ROOT_DIR + ENV WXWIN "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]" # WX 2.6.x C:/ D:/ - $ENV{ProgramFiles} + ENV ProgramFiles PATH_SUFFIXES wxWidgets-2.9.4 wxWidgets-2.9.3 diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake index 06db751..5030bcc 100644 --- a/Modules/FindwxWindows.cmake +++ b/Modules/FindwxWindows.cmake @@ -106,18 +106,6 @@ if(WIN32_STYLE_FIND) ## fix the root dir to avoid mixing of headers/libs from different ## versions/builds: - set (WXWINDOWS_POSSIBLE_ROOT_PATHS - $ENV{WXWIN} - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]" ## WX 2.6.x - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]" ## WX 2.4.x - C:\\wxWidgets-2.6.2 - D:\\wxWidgets-2.6.2 - C:\\wxWidgets-2.6.1 - D:\\wxWidgets-2.6.1 - C:\\wxWindows-2.4.2 - D:\\wxWindows-2.4.2 - ) - ## WX supports monolithic and multiple smaller libs (since 2.5.x), we prefer monolithic for now. ## monolithic = WX is built as a single big library ## e.g. compile on WIN32 as "nmake -f makefile.vc MONOLITHIC=1 BUILD=debug SHARED=0 USE_OPENGL=1" (JW) @@ -132,7 +120,18 @@ if(WIN32_STYLE_FIND) ## avoid mixing of headers and libs between multiple installed WX versions, ## select just one tree here: find_path(WXWINDOWS_ROOT_DIR include/wx/wx.h - ${WXWINDOWS_POSSIBLE_ROOT_PATHS} ) + HINTS + ENV WXWIN + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]" ## WX 2.6.x + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]" ## WX 2.4.x + PATHS + C:/wxWidgets-2.6.2 + D:/wxWidgets-2.6.2 + C:/wxWidgets-2.6.1 + D:/wxWidgets-2.6.1 + C:/wxWindows-2.4.2 + D:/wxWindows-2.4.2 + ) # message("DBG found WXWINDOWS_ROOT_DIR: ${WXWINDOWS_ROOT_DIR}") @@ -600,8 +599,10 @@ else() # wx-config should be in your path anyhow, usually no need to set WXWIN or # search in ../wx or ../../wx find_program(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE wx-config - $ENV{WXWIN} - $ENV{WXWIN}/bin + HINTS + ENV WXWIN + $ENV{WXWIN}/bin + PATHS ../wx/bin ../../wx/bin ) |