官术网_书友最值得收藏!

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.

  1. 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.
  2. 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.
    Time for action—building with a Visual Studio solution

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?

主站蜘蛛池模板: 丹棱县| 泾川县| 桃源县| 平昌县| 孝感市| 越西县| 旬阳县| 金乡县| 武鸣县| SHOW| 繁昌县| 盐边县| 岳普湖县| 修文县| 麻城市| 河南省| 翁源县| 舞钢市| 会昌县| 阿荣旗| 乳山市| 陇川县| 莱芜市| 仙桃市| 化州市| 太原市| 德州市| 额敏县| 双峰县| 清水河县| 囊谦县| 长岛县| 陵水| 定襄县| 遂溪县| 玛沁县| 班玛县| 长白| 望城县| 即墨市| 郑州市|