Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix static linking to Autotools builds using CMake (#412)
* autotools: Move mandatory dependencies from EXTRA_LDFLAGS to MIXER_LIBS Autotools variables whose names end with _LDFLAGS are usually for linker options such as -Wl,--export-dynamic which would not be appropriate to copy into the pkg-config or CMake metadata. Move these dependencies into a separate _LIBS variable, which is conventionally a list of -L and -l options (only) and *can* be copied into pkg-config or CMake metadata. This follows the same pattern as IMG_LIBS and TTF_LIBS in SDL_image and SDL_ttf. Exclude SDL_LIBS from this, because the CMake metadata has a special case for finding SDL, and linking to a different SDL causes link failure on our macOS CI. Link SDL via $(SDL_LIBS) instead. Signed-off-by: Simon McVittie <smcv@collabora.com> * sdl2_mixer-config.cmake.in: Use MIXER_LIBS for static linking We can't rely on all mandatory dependencies being in PC_LIBS, because if we found a dependency such as libflac via pkg-config, we would have put the name of the pkg-config module in PC_REQUIRES instead. Resolves: #411 Signed-off-by: Simon McVittie <smcv@collabora.com>
- Loading branch information
Showing
4 changed files
with
52 additions
and
48 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
Oops, something went wrong.