widberg / bgfx.cmake

https://github.com/bkaradzic/bgfx.cmake. Independently maintained CMake build scripts for bgfx. Released under public domain.
https://github.com/bkaradzic/bgfx.cmake
Creative Commons Zero v1.0 Universal
286 stars 252 forks source link

Update bx.cmake to include platform specific headers in target install include paths #76

Closed pr0g closed 4 years ago

pr0g commented 4 years ago

Hi there,

After building and installing bgfx using CMake on Windows, when including bx.h in my consuming application I hit the compile error that alloca.h could not be found.

There's a workaround for this in the bx repo where compat/<platform> folders are added to the target include folders - this change adds these paths for installed targets.

I also had to explicitly add include(GNUInstallDirs) as ${CMAKE_INSTALL_INCLUDEDIR} seemed to not always be populated

Thanks!

Tom

pr0g commented 4 years ago

Thanks!