1 # ConfigureMsvc3rdParty.cmake - Configure 3rd Party Library Paths on Windows
4 GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_SOURCE_DIR} PATH)
6 SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdparty.x64")
8 SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdparty")
10 if (EXISTS ${TEST_3RDPARTY_DIR})
11 set(MSVC_3RDPARTY_ROOT ${PARENT_DIR} CACHE PATH "Location where the third-party dependencies are extracted")
12 else (EXISTS ${TEST_3RDPARTY_DIR})
13 set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
14 endif (EXISTS ${TEST_3RDPARTY_DIR})
15 list(APPEND PLATFORM_LIBS "winmm.lib")
17 set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
20 if (MSVC AND MSVC_3RDPARTY_ROOT)
21 message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_ROOT}")
22 set( OSG_MSVC "msvc" )
23 if (${MSVC_VERSION} EQUAL 1600)
24 set( OSG_MSVC ${OSG_MSVC}100 )
25 else (${MSVC_VERSION} EQUAL 1600)
26 set( OSG_MSVC ${OSG_MSVC}90 )
27 endif (${MSVC_VERSION} EQUAL 1600)
29 set( OSG_MSVC ${OSG_MSVC}-64 )
30 set( MSVC_3RDPARTY_DIR 3rdParty.x64 )
31 set( BOOST_LIB lib64 )
33 set( MSVC_3RDPARTY_DIR 3rdParty )
37 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 $(BOOST_ROOT)/$(BOOST_LIB) )
38 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)
39 find_path(BOOST_ROOT boost/version.hpp
40 ${MSVC_3RDPARTY_ROOT}/boost
41 ${MSVC_3RDPARTY_ROOT}/boost_1_51_0
42 ${MSVC_3RDPARTY_ROOT}/boost_1_50_0
43 ${MSVC_3RDPARTY_ROOT}/boost_1_49_0
44 ${MSVC_3RDPARTY_ROOT}/boost_1_48_0
45 ${MSVC_3RDPARTY_ROOT}/boost_1_47_0
46 ${MSVC_3RDPARTY_ROOT}/boost_1_46_1
47 ${MSVC_3RDPARTY_ROOT}/boost_1_46_0
48 ${MSVC_3RDPARTY_ROOT}/boost_1_45_0
49 ${MSVC_3RDPARTY_ROOT}/boost_1_44_0
51 message(STATUS "BOOST_ROOT is ${BOOST_ROOT}")
52 set (OPENAL_INCLUDE_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include)
53 set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib)
54 endif (MSVC AND MSVC_3RDPARTY_ROOT)