-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: separate shared and static import targets #351
Conversation
Export the FAudio::FAudio-shared target when building a shared library and the FAudio::FAudio-static target when building a static library to separate target files so that both can be installed at the same time. Alias FAudio::FAudio to the shared library if it is installed and the static library otherwise in the Config. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
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.
This change looks okay but since we're tagging in about 12 hours I'll wait until 24.07 is out - expect a merge soon!
Can this be merged now, or is there some legal order preventing that from happening? And are you actually forced to comply with it by any means? |
No legal barriers - I and the other maintainers are just stuck on SDL_GPU at the moment. That said, it's still a failure on my part for not coordinating this better, so if it's okay I'd like to defer this to someone who is using this for similar purposes. @cybik, sorry to bother you but does this adversely affect the projects making use of the current CMake configurations? |
Full disclosure: I don't touch such projects often these days. That being said: the last active project I recall using this, is using a frozen version and rarely updates. I'll reach out to them to make them aware of this change should they update FAudio; beyond that, since the default is |
FNA would still prioritize shared as |
The main purpose of this is to allow a distribution to do two builds with both And when both are installed, it makes an Currently the way I statically link FAudio in our project is by listing the libraries and their dependents because there is no target. I have followed the convention here used by some other projects such as SDL2, which makes an In all other respects, this changes nothing. We should really support building both targets from a single build, but that's a separate issue. |
I thought it would be reasonable to make the |
Actually now that I think about it, without this change, if only the static configuration is installed, then the |
Export the FAudio::FAudio-shared target when building a shared library and the FAudio::FAudio-static target when building a static library to separate target files so that both can be installed at the same time.
Alias FAudio::FAudio to the shared library if it is installed and the static library otherwise in the Config.