]> git.mxchange.org Git - simgear.git/blobdiff - CMakeLists.txt
Improve memory occupancy and load time of random buildings.
[simgear.git] / CMakeLists.txt
index b4420de0097404888bcee4d91a93824745961121..ccde5449c0ee6cf793e83d78c282354d179cf7f1 100644 (file)
@@ -94,11 +94,13 @@ endif (MSVC)
 if (MSVC AND MSVC_3RDPARTY_ROOT)
   message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_ROOT}")
   set( OSG_MSVC "msvc" )
-  if (${MSVC_VERSION} EQUAL 1600)
+  if (${MSVC_VERSION} EQUAL 1700)
+      set( OSG_MSVC ${OSG_MSVC}110 )
+  elseif (${MSVC_VERSION} EQUAL 1600)
       set( OSG_MSVC ${OSG_MSVC}100 )
-  else (${MSVC_VERSION} EQUAL 1600)
+  else (${MSVC_VERSION} EQUAL 1700)
       set( OSG_MSVC ${OSG_MSVC}90 )
-  endif (${MSVC_VERSION} EQUAL 1600)
+  endif (${MSVC_VERSION} EQUAL 1700)
   if (CMAKE_CL_64)
       set( OSG_MSVC ${OSG_MSVC}-64 )
       set( MSVC_3RDPARTY_DIR 3rdParty.x64 )
@@ -108,27 +110,34 @@ 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 )
   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)
+  find_path(BOOST_ROOT boost/version.hpp
+                       ${MSVC_3RDPARTY_ROOT}/boost
+                       ${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}")
   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)
 
 find_package(Boost REQUIRED)
 set (BOOST_CXX_FLAGS "-DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_BIMAP_DISABLE_SERIALIZATION")
 
-find_package(ZLIB REQUIRED)
-find_package(Threads REQUIRED)
-
 if(SIMGEAR_HEADLESS)
     message(STATUS "SimGear mode: HEADLESS")
 else()
     message(STATUS "SimGear mode: NORMAL")
     find_package(OpenGL REQUIRED)
     find_package(OpenAL REQUIRED)
-    find_package(ALUT REQUIRED)
-    find_package(OpenSceneGraph 3.0.0 REQUIRED osgText osgSim osgDB osgParticle osgUtil)
+    find_package(OpenSceneGraph 3.0.0 REQUIRED osgText osgSim osgDB osgParticle osgGA osgUtil)
 endif(SIMGEAR_HEADLESS)
 
 if(JPEG_FACTORY)
@@ -156,6 +165,9 @@ else()
     message(STATUS "Subversion client support: DISABLED")
 endif(ENABLE_LIBSVN)
 
+find_package(ZLIB REQUIRED)
+find_package(Threads REQUIRED)
+
 check_include_file(sys/time.h HAVE_SYS_TIME_H)
 check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H)
 check_include_file(unistd.h HAVE_UNISTD_H)
@@ -238,7 +250,7 @@ if(WIN32)
         #     SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}")
         # endforeach(warning)
         
-        set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /wd4996")
+        set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /wd4996 /wd4250")
     endif(MSVC)
     
     # assumed on Windows
@@ -257,7 +269,7 @@ include_directories(${PROJECT_BINARY_DIR}/simgear/xml)
 
 include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS} 
     ${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} 
-    ${ALUT_INCLUDE_DIR} ${OPENAL_INCLUDE_DIR} )
+    ${OPENAL_INCLUDE_DIR} )
 
 add_definitions(-DHAVE_CONFIG_H)
 add_definitions(-DHAVE_EXPAT_CONFIG_H)