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".
This commit is contained in:
parent
d3260a46be
commit
5ec8a69cac
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue