mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
FindBoost: Allow Boost_LIB_PREFIX to be set externally
On platforms where our default Boost static library prefix is incorrect, make it possible for users to set it explicitly to work around the problem until FindBoost can be updated. Fixes: #20372
This commit is contained in:
committed by
Brad King
parent
040f503d83
commit
ff71612d02
@@ -155,6 +155,10 @@ setting variables::
|
||||
used if multiple compatible suffixes should
|
||||
be tested for, in decreasing order of
|
||||
preference.
|
||||
Boost_LIB_PREFIX - Set to the platform-specific library name
|
||||
prefix (e.g. "lib") used by Boost static libs.
|
||||
This is needed only on platforms where CMake
|
||||
does not know the prefix by default.
|
||||
Boost_ARCHITECTURE - Set to the architecture-specific library suffix
|
||||
(e.g. "-x64"). Default is auto-computed for the
|
||||
C++ compiler in use.
|
||||
@@ -1646,15 +1650,17 @@ endif()
|
||||
# Prefix initialization
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Boost's static libraries use a "lib" prefix on DLL platforms
|
||||
# to distinguish them from the DLL import libraries.
|
||||
if (Boost_USE_STATIC_LIBS AND (
|
||||
(WIN32 AND NOT CYGWIN)
|
||||
OR GHSMULTI
|
||||
))
|
||||
set(Boost_LIB_PREFIX "lib")
|
||||
else()
|
||||
set(Boost_LIB_PREFIX "")
|
||||
if ( NOT DEFINED Boost_LIB_PREFIX )
|
||||
# Boost's static libraries use a "lib" prefix on DLL platforms
|
||||
# to distinguish them from the DLL import libraries.
|
||||
if (Boost_USE_STATIC_LIBS AND (
|
||||
(WIN32 AND NOT CYGWIN)
|
||||
OR GHSMULTI
|
||||
))
|
||||
set(Boost_LIB_PREFIX "lib")
|
||||
else()
|
||||
set(Boost_LIB_PREFIX "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if ( NOT Boost_NAMESPACE )
|
||||
|
||||
Reference in New Issue
Block a user