1. 准备

建立目标树

OpenSceneGraph-VERSION (VERSION替换为版本号)
OpenSceneGraph-VERSION\3rdParty (把依赖库放在此目录)

http://www.openscenegraph.org/index.php/download-section/dependencies
OpenSceneGraph-VERSION\OpenSceneGraph(源代码放在此目录)

2. 三方依赖库构建

  1. https://github.com/bjornblissing/osg-3rdparty-cmake下载CMake脚本(Download the CMake scripts from this repository).
  2. 下载依赖库源文件. Download the source for the dependencies you would like to use from their respective location as specified below.
  3. 打开CMake GUI, 选择CMake脚本所在目录, 指定生成库输出目录. Start the CMake GUI and select the directory with the CMake scripts as your source directory. Use any desired output directory as binary directory.
  4. 在CMake GUI中按"Configure". Press Configure inside the CMake GUI.
  5. 填写依赖库源代码目录, 再按"Configure". 重复配置, 直到没有错误和警告为止. Fill in the location of the downloaded sources of your desired dependencies and press "Configure" again. Repeat until there is no more errors and warnings in CMake.
  6. Generate 在输出目录中生成VS解决方案文件. Press Generate inside the CMake GUI. This will generate solution file inside your binary directory.
  7. 在VS IDE中打开解决方案文件. Open the solution file in your IDE.
  8. 编译ALL_BUILD项目. Build the ALL_BUILD project for both debug and release.
  9. 编译INSTALL项目. Build the INSTALL project for both debug and release.

In your binary directory there will now be a folder named 3rdParty with a sub-folder named after your target platform. Inside this folder there should be all your headers and libraries.

3. 构建OpenSceneGraph解决方案

在CMake GUI中选择OpenSceneGraph 源文件目录, 设置CMake配置输出目录.

ACTUAL_3RDPARTY_DIR  3rdParty编译库集目录

CMAKE_INSTALL_PREFIX  OpenSceneGraph 编译成果安装目录

BUILD_OSG_EXAMPLES     是否编译示例

Once the sources and dependencies are in place you need to generate the Visual Studio solution and project files. This is done with CMake. Download it at http://www.cmake.org/HTML/Download.html.

Start the CMake GUI once it's installed, and select root OpenSceneGraph directory in the "Where is the source code" field. The same directory needs to be put into the "Where to build the binaries" field. If you like to do out-of-source builds, you can add \build to the end. Then click Configure.

You can then customize your build. The red lines in the CMake window indicate new variables that you may want to fill out or change, but most are optional. Some variables will be filled in automatically (such as ACTUAL_3RDPARTY_DIR, if you followed the directory structure above). I typically enable BUILD_OSG_EXAMPLES and set CMAKE_INSTALL_PREFIX to the OpenSceneGraph directory so that the binaries are installed in OpenSceneGraph\bin. You can also set it to somewhere else if you want to keep your source tree clean.

4. OpenSceneGraph编译

打开OpenSceneGraph解决方案进行编译

  1. 编译ALL_BUILD项目. Build the ALL_BUILD project for both debug and release.
  2. 编译INSTALL项目. Build the INSTALL project for both debug and release.

OSG Win7 + VS2015 编译的更多相关文章

  1. Win7 VS2015编译wxWidgets-3.1.0

    下载 https://www.wxwidgets.org/downloads/ 打开SLN工程 D:\CPPLibs\wxWidgets-3.1.0\build\msw\wx_vc14.sln 编译 ...

  2. Win7 下用 VS2015 编译最新 openssl(1.0.2j)包含32、64位debug和release版本的dll、lib(8个版本)

    Win7 64位系统下通过VS2015编译好的最新的OpenSSL(1.0.2j)所有八个版本的链接库, 包含以下八个版本: 1.32位.debug版LIB: 2.32位.release版LIB: 3 ...

  3. Win7 + VS2015 + Python3.6编译

    0. 下载安装hg. http://bitbucket.org/tortoisehg/files/downloads/tortoisehg-4.0.1-x64.msi 1. 下载Python3.6源代 ...

  4. 使用VS2015 编译 64位的boost库

    别人写的编译参考: 目标:使用VS2015 编译 64位的boost库. 一直以来都是在Win32环境下Build和使用boost,但现在基本上每天都在64位Win7下工作,所以很有必要把这几天的经验 ...

  5. VS2015编译boost1.62

    VS2015编译boost1.62 Boost库是一个可移植.提供源代码的C++库,作为标准库的后备,是C++标准化进程的开发引擎之一. Boost库由C++标准委员会库工作组成员发起,其中有些内容有 ...

  6. VS2015编译Qt5.7.0生成支持XP的静态库(很不错)

    一.编译工具 1.VS2015 编译Qt5.7.0的所需VS版本:Visual Studio 2013 (Update1)或Visual Studio 2015 (Update2).因为Update补 ...

  7. 用VS2015编译sqlcipher

    简介 SQLite,是一款轻型的数据库,是遵守ACID的关系型数据库管理系统,它包含在一个相对小的C库中.它是D.RichardHipp建立的公有领域项目.它的设计目标是嵌入式的,而且目前已经在很多嵌 ...

  8. 实践详细篇-Windows下使用VS2015编译的Caffe训练mnist数据集

    上一篇记录的是学习caffe前的环境准备以及如何创建好自己需要的caffe版本.这一篇记录的是如何使用编译好的caffe做训练mnist数据集,步骤编号延用上一篇 <实践详细篇-Windows下 ...

  9. VS2015编译FFMPEG,修改FFmpeg缓冲区大小解决实时流解码丢包问题,FFmpeg错误rtsp流地址卡死的问题,设置超时

    之前尝试过很多网上利用Windows编译FFmpeg的文章,都没有办法编译X64位的FFmpeg,有些教程中有专门提到编译64位的FFmpeg需要下载mingw-w64-install,但是编译的过程 ...

随机推荐

  1. 解决Windows2008Server上PLSQL登录时报ORA-12557

    公司的Oracle服务端是安装在一台Linux服务器上,版本号为11.1.0.7.0.我们开发的系统部署在Windows 2008 Server(x64),因为偶尔需要调用Oracle数据库,所以最开 ...

  2. Mysql数据库导入命令Source详解

    Mysql数据库导入命令Source详解 几个常用用例: 1.导出整个数据库 mysqldump -u 用户名 -p 数据库名 > 导出的文件名 mysqldump -u root -p dat ...

  3. js调试技巧 Firefox调试技巧汇总

    Firebug入门指南        :  http://www.ruanyifeng.com/blog/2008/06/firebug_tutorial.html Firebug控制台详解: htt ...

  4. Asp.Net 之 汉字转拼音

    1.利用微软提供的拼音库,计算出汉字的拼音的方法,此方法支持多音字符 下载 Visual Studio International Pack类库,该类库扩展了.NET Framework对全球化软件开 ...

  5. js数组内置方法

    var arr = ['A','B','C','D']; length 计算数组的长度 arr.length//4   indexOf() 搜索一个指定的元素的位置 arr.indexOf('C'); ...

  6. linux系统学习(常用命令)

    今天调休,闲来无事,研究一下linux系统. Linux常用命令: 一:文件管理 ctrl+alt:在虚拟机与windows之间切换ctrl+g:进入linux输入模式 pwd:查看当前目录 ls:列 ...

  7. 关于Servlet的原理以及常用类

    Servlet是JavaWeb的三大组件之一,它属于动态资源. 在Servlet中通常需要: 接收请求数据: 处理请求: 完成响应. 实现Servlet有三种方式: 实现javax.servlet.S ...

  8. SharpDevelop 编译时,任务失败,因为未找到“resgen.exe”的解决方法

    在git clone sprite的项目,在本地编译的时候,会出现 任务失败,因为未找到“resgen.exe”,或未安装正确的 Microsoft Windows SDK.任务正在注册表项 HKEY ...

  9. C#下利用封包、拆包原理解决Socket粘包、半包问题(新手篇)

    介于网络上充斥着大量的含糊其辞的Socket初级教程,扰乱着新手的学习方向,我来扼要的教一下新手应该怎么合理的处理Socket这个玩意儿. 一般来说,教你C#下Socket编程的老师,很少会教你如何解 ...

  10. 《编写高质量代码》CSS部分总结

    如何组织CSS 三层结构:base+common+page 分层目的:减少代码量:便于多人开发和维护 1.base层 最底层,一般设置文件为只读,与具体的UI无关,提供: reset功能.因为浏览器对 ...