Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: Add support for windowLibs, OSXLibs, and iOSLibs when using mo…
…dules with CMake
- Loading branch information
Showing
1 changed file
with
17 additions
and
5 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
440a969
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.
@reuk Thanks for the quick turnaround, but I'm still getting linker errors. Do note that the libs for the different platforms are living in a separate folder (e.g
<module_root>/libs/macOSX/x86_64/libABC.a
) and theOSXLibs
metadata property lists the libraryABC
(without the lib prefix and .a).440a969
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.
Ah, I'd put off handling bundled libraries as I'd assumed most CMake users would want to introduce library dependencies between other targets in their CMake projects, rather than relying on pre-built libraries. Can you tell me a bit more about your use case? Is there a reason you'd prefer to use pre-built libraries, rather than depending on other targets from your build?
440a969
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.
Hmm, that is a good point. For the library in question it's easier/better for me to add a target dependency.
However, I do have other modules where I am not sure how to add the third-party libs as target dependency (they don't seem to use cmake and I'm no build system ninja). I'm sure I can find out, but I think in reality there will be other people for whom it's more convenient to use pre-built libraries. Additionally, not handling bundled libraries is effectively a breaking change to the JUCE module format. I'm not implying there should be no breaking changes, but if it is, it should probably be documented.
Any pointers much appreciated!