OSG
官方網(wǎng)站
http://www.openscenegraph.org/
編譯
下載OpenSceneGraph-3.4.0档礁,OpenSceneGraph-Data-3.4.0界拦,3rdParty_VS2013_v120_x86_x64_V9_full。
三個文件夾都解壓到本地返咱,打開OpenSceneGraph-3.4.0/CMakeLists.txt购啄,頭部加入巨柒,之后使用cmake-gui生成sln即可缰贝。(需要指定3rdParty的路徑馍悟。)
set(DESIRED_QT_VERSION "5" CACHE STRING "")
set(CMAKE_PREFIX_PATH "E:\\Qt\\Qt5.7.0\\5.7\\msvc2013_64" CACHE PATH "")
Geos
官方網(wǎng)站
https://github.com/libgeos/libgeos
編譯
下載3.5版本
根目錄新建文件geos_svn_revision.h
,輸入:
#define GEOS_SVN_REVISION 4086
執(zhí)行編譯命令
nmake /f makefile.vc MSVC_VER=1800
nmake /f makefile.vc MSVC_VER=1800 DEBUG=1
ZLIB
官方網(wǎng)站
https://www.sqlite.org/
編譯
LIB /DEF:sqlite3.def /machine:X64
OSGEarth
官方網(wǎng)站
http://osgearth.org/
編譯
配置CMakeList.txt,頭部加入
set(DESIRED_QT_VERSION "5" CACHE STRING "")
set(CMAKE_PREFIX_PATH "E:\\Qt\\Qt5.7.0\\5.7\\msvc2013_64" CACHE PATH "")
set(ZLIB_INCLUDE_DIR "E:\\code\\OSG\\3rdParty_x86_x64\\include")
set(ZLIB_LIBRARY "E:\\code\\OSG\\3rdParty_x86_x64\\lib")
修改:
SET(THIRD_PARTY_DIR "E:\\code\\OSG\\3rdParty_x86_x64" CACHE PATH "OSG 3rd-party dependency folder")
根據(jù)CMake-Gui配置osg,qt,zlib,protobuf,geos,gdal.
編譯錯誤
- gdal的debug版本為gdal_i.lib
- 勾上 osgearth->property->Linker->Input->Additional Dependencies->inherit from parent or project defaults