Add options for building and installing shared, static libraries#53
Add options for building and installing shared, static libraries#53sizeofvoid wants to merge 1 commit intoMatroska-Org:masterfrom
Conversation
robUx4
left a comment
There was a problem hiding this comment.
After fixing Matroska-Org/libebml#70 and installing the build. The DLL version of libmatroska builds correctly.
The static version doesn't build because it cannot find libebml headers (which the DLL version finds fine via my CMAKE_INSTALL_PREFIX).
|
It's missing |
|
This PR fixes #17 |
|
|
||
| option(DISABLE_PKGCONFIG "Disable PkgConfig module generation" OFF) | ||
| option(DISABLE_CMAKE_CONFIG "Disable CMake package config module generation" OFF) | ||
| option(DISABLE_SHARED_LIBS "Disable build and install shared libraries" OFF) |
There was a problem hiding this comment.
The preferred name for this option is BUILD_SHARED_LIBS. I've seen it in a lot of libraries.
There was a problem hiding this comment.
And both libEBML & libMatroska have gained support for BUILD_SHARED_LIBS in the meantime. Maybe this PR is simply outdated & superfluous now? I'd just close it.
There was a problem hiding this comment.
As link the suggests, it can be turned into an option to make it more visible:
This variable is often added to projects as an option() so that each user of a project can decide if they want to build the project using shared or static libraries.
It works without the option (we force it in VLC).
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.