- OpenSceneGraph 3.0: Beginner's Guide
- Rui Wang Xuelei Qian
- 373字
- 2021-03-27 00:35:39
Time for action—building with a Visual Studio solution
There are only two steps left in order to build the Visual Studio solution and create your own OSG packages, which will include runtime binaries, headers, static-link libraries, utilities, and examples.
- First, select a build type (Debug, Release, RelWithDebInfo, or MinSizeRel), and build the ALL_BUILD project. This may take an extremely long time during first-time building, but will save a lot of time in subsequent compilations, unless you have cleared all intermediate files and decided to rebuild the solution completely from scratch.
- When the building process has finished, switch to the INSTALL project and "build" it. The compiler will traverse a series of post-build events that install all of the built files into the directory defined by the CMAKE_INSTALL_PREFIX option.
What just happened?
Everything is done as if you are working on your own Visual Studio solutions! The only difference is that every subproject will include an extra CMakeLists.txt
file, which will check if the source files or settings were modified in the pre-build step, and automatically regenerate the project if necessary.
Go to your installation directory to see if all of the necessary files are already there. Then run the osgversion
and osgviewer
commands in the binary directory to see if the new package performs correctly. Do not forget to hide or uninstall the prebuilt packages generated by the quick installer in order to avoid any confusion caused by the coexistence of more than one binary package.
Please note that, when using Debug
build type, the installed filename will have a postfix, of d
. For example, osgviewer.exe
will be renamed to osgviewerd.exe
, to be distinct from the Release
distribution. This behavior can be changed by setting the CMAKE_DEBUG_POSTFIX option and re-configuring the solution.
Pop quiz—the difference between ALL_BUILD and 'build all'
Some developers may love the following steps for building their Visual Studio solutions: open the Batch Build dialog box, select all projects in the current solution for inclusion in the batch build, start the build process, and go and have a cup of coffee (maybe more). Do you think this will produce the same result as using ALL_BUILD and then the INSTALL project? Will they take the same time?
- Vulkan學習指南
- 剪映AI視頻剪輯:AI腳本+AI繪畫+圖文生成+數字人制作
- 中文版CorelDRAW X7基礎培訓教程(移動學習版)
- Hadoop核心技術
- Moldflow模流分析與工程應用
- 數碼攝影后期高手之路(第2版)
- Cacti 0.8 Beginner's Guide
- 中文版Premiere Pro CC實用教程
- DWR Java AJAX Applications
- Procreate+ SketchUp +Photoshop建筑設計手繪表現技法
- VRP11/3ds Max虛擬現實制作標準實訓教程
- Adobe創意大學Photoshop CS5 產品專家認證標準教材
- Photoshop CS6從入門到精通
- 新印象:CINEMA 4D電商設計基礎與實戰(全視頻微課版)
- CakePHP Application Development