From 1438b48b8b3e9671dff61379af4fbfb2e81e598f Mon Sep 17 00:00:00 2001 From: Frederic Bouvier <fredfgfs01@free.fr> Date: Fri, 14 Dec 2012 09:11:18 +0100 Subject: [PATCH] Fix Windows build against Boost --- CMakeLists.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7435abf8..e5dec411 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,27 @@ if (MSVC AND MSVC_3RDPARTY_ROOT) set (CMAKE_LIBRARY_PATH ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenScenegraph/lib ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/SimGear/lib ) set (CMAKE_INCLUDE_PATH ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenScenegraph/include ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/SimGear/include) - set (BOOST_ROOT ${MSVC_3RDPARTY_ROOT}/boost_1_44_0) + find_path(BOOST_ROOT boost/version.hpp + ${MSVC_3RDPARTY_ROOT}/boost + ${MSVC_3RDPARTY_ROOT}/boost_1_52_0 + ${MSVC_3RDPARTY_ROOT}/boost_1_51_0 + ${MSVC_3RDPARTY_ROOT}/boost_1_50_0 + ${MSVC_3RDPARTY_ROOT}/boost_1_49_0 + ${MSVC_3RDPARTY_ROOT}/boost_1_48_0 + ${MSVC_3RDPARTY_ROOT}/boost_1_47_0 + ${MSVC_3RDPARTY_ROOT}/boost_1_46_1 + ${MSVC_3RDPARTY_ROOT}/boost_1_46_0 + ${MSVC_3RDPARTY_ROOT}/boost_1_45_0 + ${MSVC_3RDPARTY_ROOT}/boost_1_44_0 + ) + # set (BOOST_ROOT ${MSVC_3RDPARTY_ROOT}/boost_1_44_0) + message(STATUS "BOOST_ROOT is ${BOOST_ROOT}") + if (CMAKE_CL_64) + set( BOOST_LIBRARYDIR "${BOOST_ROOT}/lib64" ) + else (CMAKE_CL_64) + set( BOOST_LIBRARYDIR "${BOOST_ROOT}/lib" ) + endif (CMAKE_CL_64) + set (Boost_USE_STATIC_LIBS 1) set (OPENAL_INCLUDE_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include) set (ALUT_INCLUDE_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include) set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib)