summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorPhilip Lowman <philip@yhbt.com>2009-01-18 19:40:48 (GMT)
committerPhilip Lowman <philip@yhbt.com>2009-01-18 19:40:48 (GMT)
commit5913dc1e88a1ee551eda7706189c616c44894b1f (patch)
tree9f5e8a8a5ac3c12688044a2df058adb6a68de6ff /Modules/FindBoost.cmake
parent7e1ba9d0757885626b1ed9a26a0b014d6755429b (diff)
downloadCMake-5913dc1e88a1ee551eda7706189c616c44894b1f.zip
CMake-5913dc1e88a1ee551eda7706189c616c44894b1f.tar.gz
CMake-5913dc1e88a1ee551eda7706189c616c44894b1f.tar.bz2
BUG: Fixed superfluous and duplicate dirs in Boost_LIBRARY_DIR. Employed workaround for Issue #8378. Resolves Issue #8099
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake24
1 files changed, 21 insertions, 3 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index ea13f7a..afad7e0 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -211,9 +211,27 @@ MACRO (_Boost_ADJUST_LIB_VARS basename)
ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
IF (Boost_${basename}_LIBRARY)
- SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")
- GET_FILENAME_COMPONENT(Boost_LIBRARY_DIRS "${Boost_${basename}_LIBRARY}" PATH)
- SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
+ IF(WIN32)
+ # Workaround issue #8378.
+ SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE STRING "The Boost ${basename} library")
+ ELSE()
+ SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")
+ ENDIF()
+
+ # Remove superfluous "debug" / "optimized" keywords from
+ # Boost_LIBRARY_DIRS
+ FOREACH(_boost_my_lib ${Boost_${basename}_LIBRARY})
+ GET_FILENAME_COMPONENT(_boost_my_lib_path "${_boost_my_lib}" PATH)
+ LIST(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path})
+ ENDFOREACH()
+ LIST(REMOVE_DUPLICATES Boost_LIBRARY_DIRS)
+
+ IF(WIN32)
+ # Workaround issue #8378.
+ SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE STRING "Boost library directory")
+ ELSE()
+ SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
+ ENDIF()
SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found")
ENDIF (Boost_${basename}_LIBRARY)