fix bug on system with OPENSCAD_LIBRARIES + mult versions of boost

felipesanches-svg
don bright 2011-12-26 09:53:22 -08:00
parent f6ba8cd53a
commit 1aadb679de
1 changed files with 18 additions and 17 deletions

View File

@ -65,21 +65,8 @@ endif()
#
# Boost
if (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "")
set(BOOST_DIR "$ENV{OPENSCAD_LIBRARIES}")
endif()
if (NOT $ENV{BOOSTDIR} STREQUAL "")
set(BOOST_DIR "$ENV{BOOSTDIR}")
set(Boost_DEBUG TRUE)
endif()
if (NOT ${BOOST_DIR} STREQUAL "")
set(BOOST_ROOT ${BOOST_DIR})
message(STATUS "BOOST_ROOT: " ${BOOST_ROOT})
set(Boost_NO_SYSTEM_PATHS "TRUE")
endif()
# Update this if FindBoost.cmake gets out of sync with the current boost release
# set(Boost_ADDITIONAL_VERSIONS "1.47.0" "1.46.0")
if (WIN32)
set(Boost_USE_STATIC_LIBS TRUE)
@ -87,8 +74,22 @@ if (WIN32)
set(BOOST_THREAD_USE_LIB TRUE)
endif()
# Update this if FindBoost.cmake gets out of sync with the current boost release
# set(Boost_ADDITIONAL_VERSIONS "1.47.0" "1.46.0")
if (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "")
set(BOOST_ROOT "$ENV{OPENSCAD_LIBRARIES}")
if (EXISTS ${BOOST_ROOT}/include/boost)
# workaround bugs in FindBoost.cmake with multiple versions of boost
set(Boost_NO_SYSTEM_PATHS "TRUE")
endif()
message(STATUS "BOOST_ROOT: " ${BOOST_ROOT})
endif()
if (NOT $ENV{BOOSTDIR} STREQUAL "")
set(BOOST_ROOT "$ENV{BOOSTDIR}")
set(Boost_NO_SYSTEM_PATHS "TRUE")
set(Boost_DEBUG TRUE)
message(STATUS "BOOST_ROOT: " ${BOOST_ROOT})
endif()
find_package( Boost 1.35.0 COMPONENTS thread program_options REQUIRED)
if(Boost_FOUND)
message(STATUS "Boost includes found: " ${Boost_INCLUDE_DIRS})