[vlc-commits] [Git][videolan/vlc][master] 5 commits: contrib: fix msys CMake call not evaluated properly
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Oct 22 12:02:22 UTC 2022
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
feca5d3b by Steve Lhomme at 2022-10-22T11:09:11+00:00
contrib: fix msys CMake call not evaluated properly
- - - - -
0635dda6 by Steve Lhomme at 2022-10-22T11:09:11+00:00
contrib: don't consider windows-gnu as mingw32
windows-gnu is the name of the msys environment, which is a UNIX like
environment that runs in Windows. mingw32 is an actual Windows environment. The
msys installer provides 3 environment: windows-gnu, mingw32 and mingw64.
Depending which you use will make "gcc" produce different dumpmachine values:
- x86_64-pc-msys
- x86_64-w64-mingw32
- i686-w64-mingw32
Hiding windows-gnu means in an msys environment we do not use the HOST- prefix
and compile for msys rather than for Windows, when using
--host=x86_64-w64-mingw32. If one wants to build VLC for msys, one should use
--host=x86_64-pc-msys and the build system will match.
We already assume MSYS_BUILD in all shell environment where the build string
contains msys or mingw32.
- - - - -
330c76f3 by Steve Lhomme at 2022-10-22T11:09:11+00:00
contrib: call cygpath when MSYS_BUILD is set
This is precisely when we know this call is possible and needed.
- - - - -
72459b49 by Steve Lhomme at 2022-10-22T11:09:11+00:00
contrib: select the msys CMake generate the proper way
The export in the boostrap has no effect, nor the value set in the contrib
Makefile.
- - - - -
1cf05dcf by Steve Lhomme at 2022-10-22T11:09:11+00:00
contrib: don't modify the PKG_CONFIG_PATH on msys
It seems to work with UNIX pathes now:
> PKG_CONFIG_PATH="/home/robux/build-gcc/contrib/x86_64-w64-mingw32/lib/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig" pkg-config --cflags freetype2
> -IC:/msys64/home/robux/build-gcc/contrib/x86_64-w64-mingw32/include/freetype2
- - - - -
2 changed files:
- contrib/bootstrap
- contrib/src/main.mak
Changes:
=====================================
contrib/bootstrap
=====================================
@@ -124,7 +124,7 @@ fi
if test -z "$BUILD"
then
printf "Guessing build system... "
- BUILD="`${CC:-cc} -dumpmachine | sed s/windows-gnu/mingw32/`"
+ BUILD="`${CC:-cc} -dumpmachine`"
if test -z "$BUILD"; then
echo "FAIL!"
exit 1
@@ -260,11 +260,6 @@ test -z "$AD_CLAUSES" || add_make_enabled "AD_CLAUSES"
test -z "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
test -z "$ENABLE_PDB" || add_make_enabled "ENABLE_PDB"
-if [ "`uname -o 2>/dev/null`" = "Msys" ]; then
- add_make "CMAKE_GENERATOR := MSYS Makefiles"
- add_make "export CMAKE_GENERATOR"
-fi
-
#
# Checks
#
=====================================
contrib/src/main.mak
=====================================
@@ -253,9 +253,6 @@ endif # HAVE_CROSS_COMPILE
PKG_CONFIG ?= pkg-config
PKG_CONFIG_PATH := $(PREFIX)/lib/pkgconfig:$(PKG_CONFIG_PATH)
-ifeq ($(findstring mingw32,$(BUILD)),mingw32)
-PKG_CONFIG_PATH := $(shell cygpath -pm ${PKG_CONFIG_PATH})
-endif
export PKG_CONFIG_PATH
ifndef GIT
@@ -462,8 +459,9 @@ ifdef HAVE_WIN32
CMAKE += -DCMAKE_DEBUG_POSTFIX:STRING=
endif
ifdef MSYS_BUILD
-CMAKE := PKG_CONFIG_LIBDIR="$(PKG_CONFIG_PATH)" $(CMAKE)
+CMAKE = PKG_CONFIG_LIBDIR="$(PKG_CONFIG_PATH)" $(CMAKE)
CMAKE += -DCMAKE_LINK_LIBRARY_SUFFIX:STRING=.a
+CMAKE += -G "MSYS Makefiles"
endif
ifeq ($(V),1)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e2ecc7d920aae0808aae6b4f92a5428d2b058e46...1cf05dcff58ed4642bf07c6fced6d078d10e6afb
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e2ecc7d920aae0808aae6b4f92a5428d2b058e46...1cf05dcff58ed4642bf07c6fced6d078d10e6afb
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list