Commit 78f06dd4 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

cerbero: Fix builds with CMake recipes on Windows

If there's a leading space in `LDFLAGS`, that somehow causes CMake to
convert `-Lc:/path/to/cerbero/build/dist/windows_x86_64/lib`
to `-Lc;C:\MinGW\msys\1.0\path\to\cerbero\build\dist\windows_x86_64\lib`.

`;` is the end of that command and then the rest gets interpreted as a
new command to run: `C:MinGWmsys1.0pathtocerberobuilddistwindows_x86_64lib`

Not sure how this all happens; it's happening somewhere inside the
CMake source code, and I don't want to delve into that.

Fixes #199
parent 3926fed0
......@@ -332,9 +332,13 @@ class Config (object):
xdgdatadir += ":/usr/share:/usr/local/share"
ldflags = self.config_env.get('LDFLAGS', '')
ldflags_libdir = ' -L%s' % libdir
ldflags_libdir = '-L%s ' % libdir
if ldflags_libdir not in ldflags:
ldflags += ldflags_libdir
# Ensure there's no leading whitespace in LDFLAGS
if ldflags:
ldflags += ' ' + ldflags_libdir
ldflags = ldflags_libdir
path = self.config_env.get('PATH', None)
path = self._join_path(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment