From 08b9a0fdfa02f50e6ae2aeca1963e8f47d041dd2 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Thu, 13 Oct 2016 15:17:53 +0700 Subject: FindBoost: Simplify library dir detection with cascading if/elseif/else --- Modules/FindBoost.cmake | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 6976038..9bd7a30 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1681,13 +1681,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}") -- cgit v0.12