1
0
Fork 0

Cmake: support VS2010 and MSVC 64 bit

This commit is contained in:
Frederic Bouvier 2011-01-28 14:57:32 +01:00
parent 4f364af6d1
commit ede9a03d07

View file

@ -57,7 +57,7 @@ option(ENABLE_FGADMIN "Set to ON to build FlightGear with FGADMIN" ON)
option(EVENT_INPUT "Set to ON to build FlightGear with event-based Input support" OFF) option(EVENT_INPUT "Set to ON to build FlightGear with event-based Input support" OFF)
option(ENABLE_LIBSVN "Set to ON to build terrasync with libsvnclient support" OFF) option(ENABLE_LIBSVN "Set to ON to build terrasync with libsvnclient support" OFF)
set(MSVC_3RDPARTY_DIR NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted") set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
if(LOGGING) if(LOGGING)
# nothing # nothing
@ -82,15 +82,28 @@ else(EVENT_INPUT)
set(ENABLE_PLIB_JOYSTICK 1) set(ENABLE_PLIB_JOYSTICK 1)
endif(EVENT_INPUT) endif(EVENT_INPUT)
if (MSVC_3RDPARTY_DIR) if (MSVC AND MSVC_3RDPARTY_ROOT)
message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_DIR}") message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_ROOT}")
set (CMAKE_LIBRARY_PATH ${MSVC_3RDPARTY_DIR}/3rdParty/lib ${MSVC_3RDPARTY_DIR}/install/msvc90/OpenScenegraph/lib ${MSVC_3RDPARTY_DIR}/install/msvc90/SimGear/lib ) set( OSG_MSVC "msvc" )
set (CMAKE_INCLUDE_PATH ${MSVC_3RDPARTY_DIR}/3rdParty/include ${MSVC_3RDPARTY_DIR}/install/msvc90/OpenScenegraph/include ${MSVC_3RDPARTY_DIR}/install/msvc90/SimGear/include) if (${MSVC_VERSION} EQUAL 1600)
set (BOOST_ROOT ${MSVC_3RDPARTY_DIR}/boost_1_44_0) set( OSG_MSVC ${OSG_MSVC}100 )
set (OPENAL_INCLUDE_DIR ${MSVC_3RDPARTY_DIR}/3rdParty/include) else (${MSVC_VERSION} EQUAL 1600)
set (ALUT_INCLUDE_DIR ${MSVC_3RDPARTY_DIR}/3rdParty/include) set( OSG_MSVC ${OSG_MSVC}90 )
set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_DIR}/3rdParty/lib) endif (${MSVC_VERSION} EQUAL 1600)
endif (MSVC_3RDPARTY_DIR) if (CMAKE_CL_64)
set( OSG_MSVC ${OSG_MSVC}-64 )
set( MSVC_3RDPARTY_DIR 3rdParty.x64 )
else (CMAKE_CL_64)
set( MSVC_3RDPARTY_DIR 3rdParty )
endif (CMAKE_CL_64)
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)
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)
endif (MSVC AND MSVC_3RDPARTY_ROOT)
# check required dependencies # check required dependencies