summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@dundee.ac.uk>2017-03-29 10:27:26 (GMT)
committerBrad King <brad.king@kitware.com>2017-04-24 14:52:11 (GMT)
commit502608ab212bc5f03097f7b810a644c624f0e6dd (patch)
tree1ef0d5d1365575af0c8e6c85d3e3069dd0685dc0 /Modules
parentb479429b2c3546799319b67b77327dba7b037dff (diff)
downloadCMake-502608ab212bc5f03097f7b810a644c624f0e6dd.zip
CMake-502608ab212bc5f03097f7b810a644c624f0e6dd.tar.gz
CMake-502608ab212bc5f03097f7b810a644c624f0e6dd.tar.bz2
FindBoost: Support prebuilt Windows binaries from SourceForge
This are searched for in the default installed location C:/local/boost_${ver} Cherry picked from commit 862482df274121e6f80dca925fb01d996710ed5e for backport to CMake 3.8.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBoost.cmake12
1 files changed, 11 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 3059d25..093d8c9 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1124,6 +1124,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
@@ -1397,12 +1403,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()