Add EXPORT bgfx-config with bgfx:: namespace to auto generate a
bgfx-config.cmake file at install time (INSTALL on visual studio or make install on MakeFile projects).
The file is for use with find_package and installs itself in the
lib directory under cmake/bgfx/bgfx-config.cmake.
If installed on a linux system, find_package will find this config
file without any configuration.
This config file allows dependent projects to use commands such as
linking with bgfx:
find_package(bgfx REQUIRED COMPONENTS bgfx)
target_link_libraries(dependent PUBLIC bgfx::bgfx)
Since the library is static, the 3rd parties need to also be part of the export group.
Paths marked with BUILD_INTERFACE are done so to be ignored by the install target which will not need them. In some cases they are accompanied by INSTALL_INTERFACE, this is to set a different include path at installation. e.g. /usr/include over /home/.../project_path/include
Add
EXPORT bgfx-config
withbgfx::
namespace to auto generate abgfx-config.cmake
file at install time (INSTALL onvisual studio
ormake install
on MakeFile projects). The file is for use withfind_package
and installs itself in the lib directory undercmake/bgfx/bgfx-config.cmake
. If installed on a linux system,find_package
will find this config file without any configuration. This config file allows dependent projects to use commands such as linking with bgfx:or compiling a shader at build time:
Since the library is static, the 3rd parties need to also be part of the export group. Paths marked with
BUILD_INTERFACE
are done so to be ignored by the install target which will not need them. In some cases they are accompanied byINSTALL_INTERFACE
, this is to set a different include path at installation. e.g./usr/include
over/home/.../project_path/include