diff options
author | Roger Leigh <rleigh@dundee.ac.uk> | 2017-03-29 10:27:26 (GMT) |
---|---|---|
committer | Roger Leigh <rleigh@dundee.ac.uk> | 2017-03-29 10:27:43 (GMT) |
commit | 862482df274121e6f80dca925fb01d996710ed5e (patch) | |
tree | 23dca107e7a3a1da5a695efc00d43cc390312e70 | |
parent | 3ca6f70f8b27c08ad3470542705701e6e8e6ea05 (diff) | |
download | CMake-862482df274121e6f80dca925fb01d996710ed5e.zip CMake-862482df274121e6f80dca925fb01d996710ed5e.tar.gz CMake-862482df274121e6f80dca925fb01d996710ed5e.tar.bz2 |
FindBoost: Support prebuilt Windows binaries from SourceForge
This are searched for in the default installed location
C:/local/boost_${ver}
-rw-r--r-- | Modules/FindBoost.cmake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index cd38d47..64f92ad 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1122,6 +1122,12 @@ if(NOT Boost_INCLUDE_DIR) if( Boost_NO_SYSTEM_PATHS) list(APPEND _boost_INCLUDE_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) else() + if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC") + foreach(ver ${_Boost_KNOWN_VERSIONS}) + string(REPLACE "." "_" ver "${ver}") + list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS "C:/local/boost_${ver}") + endforeach() + endif() list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS C:/boost/include C:/boost @@ -1395,12 +1401,16 @@ foreach(c DEBUG RELEASE) if( Boost_NO_SYSTEM_PATHS ) list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) else() + foreach(ver ${_Boost_KNOWN_VERSIONS}) + string(REPLACE "." "_" ver "${ver}") + _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/local/boost_${ver}") + endforeach() + _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/boost") list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} PATHS C:/boost/lib C:/boost /sw/local/lib ) - _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/boost") endif() endif() endforeach() |