]> git.mxchange.org Git - simgear.git/commitdiff
Cmake: support VS2010 and MSVC 64 bit
authorFrederic Bouvier <fredfgfs01@free.fr>
Fri, 28 Jan 2011 13:46:05 +0000 (14:46 +0100)
committerFrederic Bouvier <fredfgfs01@free.fr>
Fri, 28 Jan 2011 13:46:05 +0000 (14:46 +0100)
CMakeLists.txt

index fc20d77ba46477e614f7046c66b73e5d09f93927..8b3e653616769635b377117f5a7430af30491ebd 100644 (file)
@@ -18,17 +18,30 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
 option(SIMGEAR_SHARED "Set to ON to build SimGear as a shared library/framework" OFF)
 option(SIMGEAR_HEADLESS "Set to ON to build SimGear with GUI/graphics support" OFF)
 option(JPEG_FACTORY "Enable JPEG-factory support" OFF)
-set(MSVC_3RDPARTY_DIR NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
-
-if (MSVC_3RDPARTY_DIR)
-  message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_DIR}")
-  set (CMAKE_LIBRARY_PATH ${MSVC_3RDPARTY_DIR}/3rdParty/lib ${MSVC_3RDPARTY_DIR}/install/msvc90/OpenScenegraph/lib )
-  set (CMAKE_INCLUDE_PATH ${MSVC_3RDPARTY_DIR}/3rdParty/include ${MSVC_3RDPARTY_DIR}/install/msvc90/OpenScenegraph/include)
-  set (BOOST_ROOT ${MSVC_3RDPARTY_DIR}/boost_1_44_0)
-  set (OPENAL_INCLUDE_DIR ${MSVC_3RDPARTY_DIR}/3rdParty/include)
-  set (ALUT_INCLUDE_DIR ${MSVC_3RDPARTY_DIR}/3rdParty/include)
-  set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_DIR}/3rdParty/lib) 
-endif (MSVC_3RDPARTY_DIR)
+set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
+
+if (MSVC_3RDPARTY_ROOT)
+  message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_ROOT}")
+  set( OSG_MSVC "msvc" )
+  if (${MSVC_VERSION} EQUAL 1600)
+      set( OSG_MSVC ${OSG_MSVC}100 )
+  else (${MSVC_VERSION} EQUAL 1600)
+      set( OSG_MSVC ${OSG_MSVC}90 )
+  endif (${MSVC_VERSION} EQUAL 1600)
+  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 )
+  set (CMAKE_INCLUDE_PATH ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenScenegraph/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_3RDPARTY_ROOT)
 
 find_package(Boost REQUIRED)
 set (BOOST_CXX_FLAGS "-DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_BIMAP_DISABLE_SERIALIZATION")