[vlc-commits] [Git][videolan/vlc][master] 3 commits: tools: always use a ninja version supporting jobserver

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Tue Jan 3 13:17:40 UTC 2023



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
106f0ea1 by Steve Lhomme at 2023-01-03T12:33:15+00:00
tools: always use a ninja version supporting jobserver

This will build contribs in a nicer way

- - - - -
7a23af4b by Steve Lhomme at 2023-01-03T12:33:15+00:00
contribs: use Ninja with CMake targets by default

The user can set the CMAKE_GENERATOR environment variable to override this.

- - - - -
c44f6124 by Steve Lhomme at 2023-01-03T12:33:15+00:00
contrib: remove the forced MSYS CMake generator

Ninja should work better than the UNIX vs MSYS makefile generators.

- - - - -


2 changed files:

- contrib/src/main.mak
- extras/tools/bootstrap


Changes:

=====================================
contrib/src/main.mak
=====================================
@@ -10,6 +10,8 @@ SRC_BUILT := $(TOPSRC_BUILT)/src
 TARBALLS := $(TOPSRC)/tarballs
 VLC_TOOLS ?= $(TOPSRC)/../extras/tools/build
 
+CMAKE_GENERATOR ?= Ninja
+
 PATH :=$(abspath $(VLC_TOOLS)/bin):$(PATH)
 export PATH
 
@@ -460,8 +462,8 @@ endif
 ifdef MSYS_BUILD
 CMAKE = PKG_CONFIG_LIBDIR="$(PKG_CONFIG_PATH)" $(CMAKE)
 CMAKE += -DCMAKE_LINK_LIBRARY_SUFFIX:STRING=.a
-CMAKE += -G "MSYS Makefiles"
 endif
+CMAKE += -G $(CMAKE_GENERATOR)
 
 ifeq ($(V),1)
 CMAKE += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON


=====================================
extras/tools/bootstrap
=====================================
@@ -96,6 +96,28 @@ else
 fi
 }
 
+check_ninja() {
+if ! ninja --version >/dev/null 2>&1
+then
+    echo "ninja not found"
+    NEEDED="$NEEDED ninja"
+else
+    jobserver=`ninja --version | head -1 | grep .jobserver`
+    if [ -z "$jobserver" ]; then
+        echo "ninja missing jobserver support"
+        NEEDED="$NEEDED ninja"
+    else
+        # found, need to check version ?
+        if [ -z "$1" ];then
+            FOUND="$FOUND ninja"
+        else
+            gotver=`ninja --version | head -1 | sed s/'.* '//`
+            check_version ninja $gotver $1
+        fi
+    fi
+fi
+}
+
 check() {
 if ! $1 --version >/dev/null 2>&1 && ! $1 -version >/dev/null 2>&1
 then
@@ -129,7 +151,7 @@ check_nasm 2.14
 check gettext
 check help2man
 check meson 0.59.0
-check ninja
+check_ninja
 
 DEPS_ONLY="help2man"
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cd5a9c3d35bc6e9ecea30011b0b9e9711d19eeca...c44f61245d2b37f2256f738947211d509c95368e

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cd5a9c3d35bc6e9ecea30011b0b9e9711d19eeca...c44f61245d2b37f2256f738947211d509c95368e
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