-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Minimal CMake
By :

For the final example in this chapter, we’re going to look at bringing in another larger dependency. The dependency in question is a graphics library called bgfx
(https://github.com/bkaradzic/bgfx). bgfx
is a cross-platform rendering library that works across Windows, macOS, and Linux, as well as many other platforms including iOS, Android, and consoles. It’s a large project that can take some time to build, which makes it a perfect candidate for installing and using with ExternalProject_Add
.
As we’re still writing our application in C, we need to use the C interface provided by bgfx
, and to do so, we must use it as a shared library. One issue with this is that we need to build the shaders we’re going to load using a tool built as part of bgfx
called shaderc
, and this needs bgfx
to be compiled statically (at least on Windows). To account for this, we have two references to bgfx
: bgfx
and bgfxt
(we&...