forked from widberg/bgfx.cmake
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This makes it so in shared mode, bx and bimg static libs aren't installed
- Loading branch information
1 parent
2bd5c20
commit f8f30ca
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f8f30ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bwrsandman,
I ran into an issue with this change causing a build break and wanted to check if this change was the right thing to do.
Right now in
bx.cmake
there's some code to setup the include directories forbx
to use. One is thecompat
files (for things likealloca.h
on Windows). By makingbx
private, that include directory is no longer transitively brought in bybgfx
, so the consuming library must also explicitly depend onbx
which can be confusing... (see this commit - pr0g/sdl-bgfx-imgui-starter@068dc2c).For example
embedded_shader.h
(in the include folder ofbgfx
) contains#include <bx/bx.h>
, which constitues part of the public API ofbgfx
, sobx
can't (yet at least) be a private dependency.It seems like it's safe to make
bimg
private but couldbx
please me made public again (until all references tobx.h
have been moved out ofbgfx.h
headers).Thanks for your time,
Tom
f8f30ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An issue comes up for installations on *nix systems that those same headers can create conflicts with existing headers in
/usr/include
, for example havingtinystl
installed. Not to mention/usr/include/compat
is very ambiguous.We will have to think of a solution for this.
f8f30ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the context @bwrsandman.
Ah I see... I usually install to a custom directory under a bgfx folder so haven't run into this but I can see how that could interfere with other headers on *nix systems. If everything was under
include/bx/compat
it might not be so bad? But yeah tricky to get right across all platforms without breaking anything...I'm unblocked for now but I just think it's one of those things that could be easy to trip up on and make usage more difficult for new users.
Thanks for getting back to me so quickly.
Tom