diff options
author | Brad King <brad.king@kitware.com> | 2020-03-31 13:23:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-31 13:23:13 (GMT) |
commit | 0f66cb6b225123a900c914a01b85730da9c1261d (patch) | |
tree | a4b3f68ebe99a1ddc2fd4b961fcfa5ec927091c8 /Modules | |
parent | 1fa4baf628bb991aacfa97b2a8fa2bca58196394 (diff) | |
parent | ff71612d02c1155162d432212a6ae228493affd0 (diff) | |
download | CMake-0f66cb6b225123a900c914a01b85730da9c1261d.zip CMake-0f66cb6b225123a900c914a01b85730da9c1261d.tar.gz CMake-0f66cb6b225123a900c914a01b85730da9c1261d.tar.bz2 |
Merge topic 'FindBoost-lib-prefix-override'
ff71612d02 FindBoost: Allow Boost_LIB_PREFIX to be set externally
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4531
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindBoost.cmake | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 38d3bfa..fb8cdeb 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -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 ) |