summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake46
1 files changed, 23 insertions, 23 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 69476203..266d135 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -892,7 +892,7 @@ endfunction()
# This function would append corresponding directories if MSVC is a current compiler,
# so having `BOOST_ROOT` would be enough to specify to find everything.
#
-macro(_Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir)
+macro(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir)
if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_arch_suffix 64)
@@ -900,19 +900,19 @@ macro(_Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar base
set(_arch_suffix 32)
endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-15.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-15.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-14.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-12.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-12.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-11.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-11.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-10.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-10.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-9.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-9.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-8.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-8.0)
endif()
endif()
endmacro()
@@ -1332,13 +1332,13 @@ string(APPEND _boost_DEBUG_ABI_TAG "d")
# p using the STLport standard library rather than the
# default one supplied with your compiler
if(Boost_USE_STLPORT)
- set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p")
- set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p")
+ string(APPEND _boost_RELEASE_ABI_TAG "p")
+ string(APPEND _boost_DEBUG_ABI_TAG "p")
endif()
# n using the STLport deprecated "native iostreams" feature
if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
- set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n")
- set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n")
+ string(APPEND _boost_RELEASE_ABI_TAG "n")
+ string(APPEND _boost_DEBUG_ABI_TAG "n")
endif()
if(Boost_DEBUG)
@@ -1376,10 +1376,10 @@ foreach(c DEBUG RELEASE)
if(BOOST_ROOT)
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${BOOST_ROOT}/lib ${BOOST_ROOT}/stage/lib)
- _Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} BOOST_ROOT)
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${BOOST_ROOT}")
elseif(_ENV_BOOST_ROOT)
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${_ENV_BOOST_ROOT}/lib ${_ENV_BOOST_ROOT}/stage/lib)
- _Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} _ENV_BOOST_ROOT)
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${_ENV_BOOST_ROOT}")
endif()
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c}
@@ -1387,6 +1387,7 @@ foreach(c DEBUG RELEASE)
${Boost_INCLUDE_DIR}/../lib
${Boost_INCLUDE_DIR}/stage/lib
)
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}/..")
if( Boost_NO_SYSTEM_PATHS )
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
else()
@@ -1395,6 +1396,7 @@ foreach(c DEBUG RELEASE)
C:/boost
/sw/local/lib
)
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/boost")
endif()
endif()
endforeach()
@@ -1409,9 +1411,9 @@ endif()
if( Boost_USE_STATIC_LIBS )
set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
- set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .lib .a)
else()
- set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
endif()
endif()
@@ -1437,7 +1439,7 @@ endif()
set(_boost_STATIC_RUNTIME_WORKAROUND false)
if(WIN32 AND Boost_USE_STATIC_LIBS)
if(NOT DEFINED Boost_USE_STATIC_RUNTIME)
- set(_boost_STATIC_RUNTIME_WORKAROUND true)
+ set(_boost_STATIC_RUNTIME_WORKAROUND TRUE)
endif()
endif()
@@ -1700,13 +1702,11 @@ if(Boost_FOUND)
endif()
if(EXISTS "${_boost_LIB_DIR}/lib")
- set(_boost_LIB_DIR ${_boost_LIB_DIR}/lib)
+ string(APPEND _boost_LIB_DIR /lib)
+ elseif(EXISTS "${_boost_LIB_DIR}/stage/lib")
+ string(APPEND _boost_LIB_DIR "/stage/lib")
else()
- if(EXISTS "${_boost_LIB_DIR}/stage/lib")
- set(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib)
- else()
- set(_boost_LIB_DIR "")
- endif()
+ set(_boost_LIB_DIR "")
endif()
if(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")