-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add options for building and installing shared, static libraries #70
base: master
Are you sure you want to change the base?
Conversation
@robUx4 Can you test this PR on Windows, please? |
I get these compilation errors (VS Code with Clang 11 from Visual Studio 2019)
There are 2 errors.
|
Adding the
Now given it's built with Defining |
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.
Changes to EBML_DLL_EXPORT needed
|
||
target_compile_definitions(ebml | ||
PUBLIC EBML_DLL | ||
PRIVATE EBML_DLL_EXPORT) |
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.
Needs to be ebml_EXPORTS
, not EBML_DLL_EXPORT
.
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.
The libmatroska version doesn't have this and it's exporting the DLL symbols correctly. Removing this target_compile_definitions
completely also fixes the issue.
Also it seems both the static and dynamic builds generate a There are also an |
This PR adds cmake options for building and installing shared and/or static libraries. All combinations were tested on a UNIX-like system. Therefore a test under Windows is missing.