IF(WIN32)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
ELSE(WIN32)
IF(APPLE)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
IF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4 AND ${CMAKE_PATCH_VERSION} LESS 7)
MESSAGE("Warning: A critical CMake bug exists in 2.4.6 and below. Trying to build Universal Binaries will result in a compile error that seems unrelated. Either avoid building Universal Binaries by changing the CMAKE_OSX_ARCHITECTURES field to list only your architecture, or upgrade to the current CVS version of CMake or a newer stable version if it exists.")
ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4 AND ${CMAKE_PATCH_VERSION} LESS 7)
ELSE(APPLE)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0 FATAL_ERROR)
ENDIF(APPLE)
ENDIF(WIN32)
if(COMMAND cmake_policy)
# Works around warnings libraries linked against that don't
# have absolute paths (e.g. -lpthreads)
cmake_policy(SET CMP0003 NEW)
# Works around warnings about escaped quotes in ADD_DEFINITIONS
# statements.
cmake_policy(SET CMP0005 OLD)
endif(COMMAND cmake_policy)
PROJECT(OSGEARTH)
SET(OSGEARTH_MAJOR_VERSION 0)
SET(OSGEARTH_MINOR_VERSION 1)
SET(OSGEARTH_PATCH_VERSION 0)
SET(OSGEARTH_SOVERSION 1)
SET(OSGEARTH_VERSION ${OSGEARTH_MAJOR_VERSION}.${OSGEARTH_MINOR_VERSION}.${OSGEARTH_PATCH_VERSION})
# We want to build SONAMES shared librariess
SET(OSGEARTH_SONAMES TRUE)
SET(OPENTHREADS_SONAMES TRUE)
SET(OpenThreads_SOURCE_DIR ${OSGEARTH_SOURCE_DIR})
# We have some custom .cmake scripts not in the official distribution.
# Maybe this can be used override existing behavior if needed?
SET(CMAKE_MODULE_PATH "${OSGEARTH_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
# Okay, here's the problem: On some platforms, linking against OpenThreads
# is not enough and explicit linking to the underlying thread library
# is also required (e.g. FreeBSD). But OpenThreads may be built with different
# backends (Pthreads, Sproc, Windows) so we don't know what the underlying
# thread library is because some platforms support multiple backends (e.g.
# IRIX supports Sproc and Pthreads). Linking all libraries won't work
# because the libraries may be incompatible.
# So the current solution is to attempt best guess linking and exempt certain
# cases. With IRIX, we're going to hope explicit linking to the underlying
# library is not necessary. We currently don't case for pthreads on Windows
# which might be an issue on things like Cygwin. This may need to be fixed.
FIND_PACKAGE(Threads)
IF(CMAKE_SYSTEM MATCHES IRIX)
# Erase CMAKE_THREAD_LIBS_INIT and hope it works
SET(CMAKE_THREAD_LIBS_INIT "" CACHE INTERNAL "")
ENDIF(CMAKE_SYSTEM MATCHES IRIX)
FIND_PACKAGE(OpenGL)
FIND_PACKAGE(CURL)
FIND_PACKAGE(GDAL)
FIND_PACKAGE(LibZip)
IF(UNIX)
# Not sure what this will do on Cygwin and Msys
# Also, remember OS X X11 is a user installed option so it may not exist.
FIND_PACKAGE(X11)
# Some Unicies need explicit linkage to the Math library or the build fails.
FIND_LIBRARY(MATH_LIBRARY m)
ENDIF(UNIX)
# Make the headers visible to everything
INCLUDE_DIRECTORIES(
${OSGEARTH_SOURCE_DIR}/src
${OSG_DIR}/include
${OSG_INCLUDE_DIR}
)
# Common global definitions
#ADD_DEFINITIONS(-D)
# Platform specific definitions
########################################################################################################
##### these were settings located in SetupCommon.cmake used in Luigi builds.... find out what are useful
########################################################################################################
#luigi#SET(CMAKE_VERBOSE_MAKEFILE TRUE)
#luigi#SET(CMAKE_SKIP_RPATH TRUE)
#luigi#SET(CMAKE_SKIP_RULE_DEPENDENCY TRUE)
#luigi#IF(UNIX)
#luigi# LIST_CONTAINS(contains "g++" ${CMAKE_CXX_COMPILER_LIST})
#luigi# IF (contains)
#luigi# MESSAGE(${MY_MESSAGE_DEFAULT} "${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} setting CMAKE_CXX_COMPILER to g++")
#luigi# SET(CMAKE_CXX_COMPILER "g++")
#luigi# SET(CMAKE_CXX_COMPILER_LOADED 2)
#luigi# SET(CMAKE_CXX_COMPILER_WORKS 2)
#luigi# ENDIF (contains)
#luigi# SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
#luigi# SET(CMAKE_CXX_FLAGS_DEBUG "-ggdb -gstabs")
#luigi#ENDIF(UNIX)
########################################################################################################
# Common to all platforms:
SET(OSG_DIR "" CACHE PATH "set to base osg install path")
FIND_PACKAGE(EXPAT)
SET(CMAKE_DEBUG_POSTFIX "d")
FIND_PACKAGE(OSG)
#FIND_PACKAGE(GDAL)
################################################################################
# Create bin and lib directories if required
IF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin ${CMAKE_BINARY_DIR}/lib)
ENDIF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
################################################################################
# Installation stuff
IF(UNIX AND NOT WIN32 AND NOT APPLE)
IF(CMAKE_SIZEOF_VOID_P MATCHES "8")
SET(LIB_POSTFIX "64" CACHE STRING "suffix for 32/64 dir placement")
MARK_AS_ADVANCED(LIB_POSTFIX)
ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8")
ENDIF(UNIX AND NOT WIN32 AND NOT APPLE)
IF(NOT DEFINED LIB_POSTFIX)
SET(LIB_POSTFIX "")
ENDIF(NOT DEFINED LIB_POSTFIX)
#SET(OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin/${CMAKE_SYSTEM_NAME})
SET(OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin)
MAKE_DIRECTORY(${OUTPUT_BINDIR})
SET(EXECUTABLE_OUTPUT_PATH ${OUTPUT_BINDIR})
#SET(OUTPUT_LIBDIR ${PROJECT_BINARY_DIR}/lib/${CMAKE_SYSTEM_NAME})
SET(OUTPUT_LIBDIR ${PROJECT_BINARY_DIR}/lib)
MAKE_DIRECTORY(${OUTPUT_LIBDIR})
SET(LIBRARY_OUTPUT_PATH ${OUTPUT_LIBDIR})
LINK_DIRECTORIES( ${LINK_DIRECTORIES} ${OUTPUT_LIBDIR} )
#SET(INSTALL_BINDIR VIRTUALPLANETBUILDER/bin)
#SET(INSTALL_INCDIR VIRTUALPLANETBUILDER/include)
#SET(INSTALL_LIBDIR VIRTUALPLANETBUILDER/lib)
#SET(INSTALL_DOCDIR VIRTUALPLANETBUILDER/doc)
################################################################################
# User Options
# Expose CMAKE_INCLUDE_PATH and CMAKE_LIBARY_PATH to the GUI so users
# may set these values without needing to manipulate the environment.
SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} CACHE STRING "You may add additional search paths here. Use ; to separate multiple paths.")
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} CACHE STRING "You may add additional search paths here. Use ; to separate multiple paths.")
# We are proposing that a new variable called CMAKE_PREFIX_PATH be introduced
# to CMake to compliment CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH.
# A formal feature request has been submited to CMake, Bug #4947.
# It is intended for those users who have common prefixes for their INCLUDE
# and LIBRARY locations. So if users have headers in /usr/local/include
# and libraries in /usr/local/lib, the common prefix is /usr/local.
# It should also cover the case where headers and libraries are
# in the same directory.
# Our proposal expects that FIND_* commands will automatically search for
# CMAKE_PREFIX_PATH right after CMAKE_INCLUDE_PATH or CMAKE_LIBRARY_PATH.
# Obviously, since CMake does not currently support this, we must write
# our Find*.cmake modules to explicitly support this. Otherwise, this variable
# will have no impact.
# This is unofficial so this may be removed or changed at anytime.
SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} CACHE STRING "(EXPERIMENTAL) You may add additional search paths here. Use ; to separate multiple paths.")
# Dynamic vs Static Linking
OPTION(DYNAMIC_OSGEARTH "Set to ON to build OSGEARTH for dynamic linking. Use OFF for static." ON)
IF (DYNAMIC_OSGEARTH)
SET(OSGEARTH_USER_DEFINED_DYNAMIC_OR_STATIC "SHARED")
ELSE (DYNAMIC_OSGEARTH)
SET(OSGEARTH_USER_DEFINED_DYNAMIC_OR_STATIC "STATIC")
ENDIF(DYNAMIC_OSGEARTH)
#Whether or not to copy osgEarth to the OSG_DIR during installation
# Dynamic vs Static Linking
OPTION(INS
没有合适的资源?快使用搜索试试~ 我知道了~
osgearth-1.0
共138个文件
cpp:40个
earth:32个
txt:21个
需积分: 5 0 下载量 131 浏览量
2024-05-16
21:20:54
上传
评论
收藏 9.22MB ZIP 举报
温馨提示
osgearth早期版本,代码少,矮小精干,结构清晰,便于分析源码和学习。
资源推荐
资源详情
资源评论
收起资源包目录
osgearth-1.0 (138个子文件)
CacheSeed 3KB
Capabilities 7KB
OsgEarthMacroUtils.cmake 15KB
UtilityMacros.cmake 6KB
FindOpenThreads.cmake 6KB
FindOSG.cmake 3KB
ListHandle.cmake 3KB
FindGDAL.cmake 2KB
FindCURL.cmake 2KB
FindLibZip.cmake 1KB
FindExpat.cmake 1KB
ModuleInstall.cmake 983B
Common 2KB
JsonUtils.cpp 84KB
ReaderWriterGDAL.cpp 42KB
TileBuilder.cpp 29KB
MapConfig.cpp 23KB
ReaderWriterVPB.cpp 22KB
GeocentricTileBuilder.cpp 19KB
TMS.cpp 18KB
TerrainTileEdgeNormalizerUpdateCallback.cpp 15KB
HTTPClient.cpp 14KB
ReaderWriterZipFS.cpp 13KB
TileGridProfile.cpp 11KB
TileService.cpp 11KB
TileSource.cpp 11KB
ProjectedTileBuilder.cpp 11KB
ReaderWriterWMS.cpp 10KB
Capabilities.cpp 9KB
XmlUtils.cpp 8KB
ReaderWriterTMS.cpp 8KB
HeightFieldUtils.cpp 8KB
Mercator.cpp 8KB
ReaderWriterGoogle.cpp 7KB
WCS11Source.cpp 7KB
CacheSeed.cpp 7KB
ReaderWriterOsgEarth.cpp 6KB
MapService.cpp 6KB
MultiImage.cpp 5KB
ReaderWriterArcGISMapCache.cpp 5KB
ReaderWriterTileCache.cpp 5KB
osgearth_clouds.cpp 5KB
ImageUtils.cpp 5KB
ReaderWriterArcGIS.cpp 5KB
ReaderWriterYahoo.cpp 5KB
ReaderWriterTileService.cpp 4KB
TileKey.cpp 4KB
osgearth_seed.cpp 4KB
ImageToHeightFieldConverter.cpp 3KB
FileUtils.cpp 3KB
ReaderWriterWCS.cpp 2KB
Registry.cpp 1KB
Version.cpp 895B
advanced_caching.earth 2KB
jpl_dailyplanet.earth 1KB
jpl_tileservice.earth 1KB
heightfield.earth 1KB
gdal_multiple_files.earth 1KB
google_labels.earth 854B
openstreetmap.earth 837B
yahoo_maps.earth 784B
traffic.earth 731B
usgs_labels.earth 712B
simple_caching.earth 676B
vpb_earth_bayarea.earth 671B
google_maps.earth 650B
hires-inset.earth 636B
google_imagery.earth 628B
arc_physical.earth 622B
metacarta_tilecache.earth 613B
google_maps_flat.earth 565B
arc_imagery_roads.earth 562B
yahoo_aerial.earth 554B
min_max_level.earth 537B
tms_geodetic.earth 513B
tms_boston.earth 491B
metacarta_wms.earth 489B
arc_shaded_relief.earth 483B
arc_mapcache.earth 475B
worldwind_tileservice.earth 460B
arc_policital.earth 443B
i3_landsat.earth 420B
openaerialmap.earth 328B
tms_projected.earth 181B
tms_merc.earth 171B
Export 2KB
FileUtils 2KB
GeocentricTileBuilder 2KB
osgearth.gif 3KB
MapService.h 3KB
WCS11Source.h 2KB
Extent.h 2KB
HeightFieldUtils 2KB
HTTPClient 4KB
ImageToHeightFieldConverter 2KB
ImageUtils 2KB
cmake_uninstall.cmake.in 876B
clouds.jpg 366KB
JsonUtils 47KB
MapConfig 13KB
共 138 条
- 1
- 2
资源评论
我是包不同
- 粉丝: 72
- 资源: 62
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功