summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-09-24 15:11:51 (GMT)
committerBrad King <brad.king@kitware.com>2012-09-27 15:01:11 (GMT)
commit5ec8a69caca440d0cf07c769ff90bd8e26230f3d (patch)
tree7a782998eca9b0167396fba179c119d7980af06d /Modules/FindBoost.cmake
parentd3260a46be7a98ea16fc4db83c4d3bf3b4c25f2e (diff)
downloadCMake-5ec8a69caca440d0cf07c769ff90bd8e26230f3d.zip
CMake-5ec8a69caca440d0cf07c769ff90bd8e26230f3d.tar.gz
CMake-5ec8a69caca440d0cf07c769ff90bd8e26230f3d.tar.bz2
FindBoost: Use PATH_SUFFIXES to look in "Program Files"
The CMake find_path command looks under the proper "Program Files" directories on Windows with any of the provided PATH_SUFFIXES. This is simpler and more robust than directly reading ENV{ProgramFiles}. Once Boost_INCLUDE_DIR has been located we already look next to it for the lib directory anyway, so we do not need special help to find Boost libraries under "Program Files".
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake14
1 files changed, 6 insertions, 8 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index cd5d586..77a8991 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -603,8 +603,6 @@ endif()
set(_boost_INCLUDE_SEARCH_DIRS_SYSTEM
C:/boost/include
C:/boost
- "$ENV{ProgramFiles}/boost/include"
- "$ENV{ProgramFiles}/boost"
/sw/local/include
)
@@ -697,8 +695,12 @@ if( NOT Boost_INCLUDE_DIR )
_boost_BOOSTIFIED_VERSION ${_boost_VER})
endif()
- list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
- list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
+ list(APPEND _boost_PATH_SUFFIXES
+ "boost-${_boost_BOOSTIFIED_VERSION}"
+ "boost_${_boost_BOOSTIFIED_VERSION}"
+ "boost/boost-${_boost_BOOSTIFIED_VERSION}"
+ "boost/boost_${_boost_BOOSTIFIED_VERSION}"
+ )
endforeach()
@@ -861,10 +863,6 @@ set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS
set(_boost_LIBRARY_SEARCH_DIRS_SYSTEM
C:/boost/lib
C:/boost
- "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
- "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"
- "$ENV{ProgramFiles}/boost/lib"
- "$ENV{ProgramFiles}/boost"
/sw/local/lib
)
set(_boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS})