[vlc-commits] contrib: set BUILD_SHARED_LIBS OFF (static libraries) for all cmake targets
Steve Lhomme
git at videolan.org
Tue May 26 09:41:11 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon May 18 11:10:10 2020 +0200| [9f5188734f19846ccb68cbcfdd67e732a59bb9ed] | committer: Steve Lhomme
contrib: set BUILD_SHARED_LIBS OFF (static libraries) for all cmake targets
We build all contribs as static libraries.
The setting exists since CMake 3.0. For targets built with older CMake settings
the value is discarded.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9f5188734f19846ccb68cbcfdd67e732a59bb9ed
---
contrib/src/chromaprint/rules.mak | 2 +-
contrib/src/ebml/rules.mak | 2 +-
contrib/src/gme/rules.mak | 2 +-
contrib/src/main.mak | 3 ++-
contrib/src/matroska/rules.mak | 2 +-
contrib/src/mysofa/rules.mak | 2 +-
contrib/src/openjpeg/rules.mak | 2 +-
contrib/src/soxr/rules.mak | 1 -
contrib/src/taglib/rules.mak | 4 +---
9 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/contrib/src/chromaprint/rules.mak b/contrib/src/chromaprint/rules.mak
index 2ca2d4de4d..cac496d2c8 100644
--- a/contrib/src/chromaprint/rules.mak
+++ b/contrib/src/chromaprint/rules.mak
@@ -21,6 +21,6 @@ chromaprint: chromaprint-$(CHROMAPRINT_VERSION).tar.gz .sum-chromaprint
DEPS_chromaprint = ffmpeg $(DEPS_ffmpeg)
.chromaprint: chromaprint toolchain.cmake
- cd $< && $(HOSTVARS_PIC) $(CMAKE) -DBUILD_SHARED_LIBS:BOOL=OFF
+ cd $< && $(HOSTVARS_PIC) $(CMAKE)
cd $< && $(MAKE) install
touch $@
diff --git a/contrib/src/ebml/rules.mak b/contrib/src/ebml/rules.mak
index 6cd3c3318d..5859439e75 100644
--- a/contrib/src/ebml/rules.mak
+++ b/contrib/src/ebml/rules.mak
@@ -20,6 +20,6 @@ ebml: libebml-$(EBML_VERSION).tar.xz .sum-ebml
EBML_CXXFLAGS := $(CXXFLAGS) $(PIC) -fexceptions -fvisibility=hidden
.ebml: ebml toolchain.cmake
- cd $< && $(HOSTVARS_PIC) CXXFLAGS="$(EBML_CXXFLAGS)" $(CMAKE) -DBUILD_SHARED_LIBS=OFF -DENABLE_WIN32_IO=OFF
+ cd $< && $(HOSTVARS_PIC) CXXFLAGS="$(EBML_CXXFLAGS)" $(CMAKE) -DENABLE_WIN32_IO=OFF
cd $< && $(MAKE) install
touch $@
diff --git a/contrib/src/gme/rules.mak b/contrib/src/gme/rules.mak
index 5f6e4a0228..60af152940 100644
--- a/contrib/src/gme/rules.mak
+++ b/contrib/src/gme/rules.mak
@@ -18,6 +18,6 @@ game-music-emu: game-music-emu-$(GME_VERSION).tar.bz2 .sum-gme
$(MOVE)
.gme: game-music-emu toolchain.cmake
- cd $< && $(HOSTVARS_PIC) $(CMAKE) -DBUILD_SHARED_LIBS=OFF .
+ cd $< && $(HOSTVARS_PIC) $(CMAKE) .
cd $< && $(MAKE) install
touch $@
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index c482046088..eadd02a803 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -396,7 +396,8 @@ endif
RECONF = mkdir -p -- $(PREFIX)/share/aclocal && \
cd $< && $(AUTORECONF) -fiv $(ACLOCAL_AMFLAGS)
CMAKE = cmake . -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake) \
- -DCMAKE_INSTALL_PREFIX=$(PREFIX) $(CMAKE_GENERATOR)
+ -DCMAKE_INSTALL_PREFIX=$(PREFIX) $(CMAKE_GENERATOR) \
+ -DBUILD_SHARED_LIBS:BOOL=OFF
ifdef HAVE_WIN32
CMAKE += -DCMAKE_DEBUG_POSTFIX:STRING=
endif
diff --git a/contrib/src/matroska/rules.mak b/contrib/src/matroska/rules.mak
index 6d894decb2..f49210064a 100644
--- a/contrib/src/matroska/rules.mak
+++ b/contrib/src/matroska/rules.mak
@@ -24,6 +24,6 @@ libmatroska: libmatroska-$(MATROSKA_VERSION).tar.xz .sum-matroska
MATROSKA_CXXFLAGS := $(CXXFLAGS) $(PIC) -fvisibility=hidden -O2
.matroska: libmatroska toolchain.cmake
- cd $< && $(HOSTVARS_PIC) CXXFLAGS="$(MATROSKA_CXXFLAGS)" $(CMAKE) -DBUILD_SHARED_LIBS=OFF
+ cd $< && $(HOSTVARS_PIC) CXXFLAGS="$(MATROSKA_CXXFLAGS)" $(CMAKE)
cd $< && $(MAKE) install
touch $@
diff --git a/contrib/src/mysofa/rules.mak b/contrib/src/mysofa/rules.mak
index baa27f19d1..fe443988c9 100644
--- a/contrib/src/mysofa/rules.mak
+++ b/contrib/src/mysofa/rules.mak
@@ -25,7 +25,7 @@ mysofa: libmysofa-$(MYSOFA_VERSION).tar.gz .sum-mysofa
.mysofa: mysofa toolchain.cmake
cd $< && rm -f CMakeCache.txt
- cd $< && $(HOSTVARS) $(CMAKE) -DBUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF
+ cd $< && $(HOSTVARS) $(CMAKE) -DBUILD_TESTS=OFF
cd $< && $(MAKE) install
touch $@
diff --git a/contrib/src/openjpeg/rules.mak b/contrib/src/openjpeg/rules.mak
index 184c484f00..ad51638902 100644
--- a/contrib/src/openjpeg/rules.mak
+++ b/contrib/src/openjpeg/rules.mak
@@ -27,7 +27,7 @@ endif
.openjpeg: openjpeg toolchain.cmake
cd $< && $(HOSTVARS) $(CMAKE) \
- -DBUILD_SHARED_LIBS:bool=OFF -DBUILD_PKGCONFIG_FILES=ON \
+ -DBUILD_PKGCONFIG_FILES=ON \
-DBUILD_CODEC:bool=OFF \
.
cd $< && $(MAKE) install
diff --git a/contrib/src/soxr/rules.mak b/contrib/src/soxr/rules.mak
index a26557b6fb..3981271743 100644
--- a/contrib/src/soxr/rules.mak
+++ b/contrib/src/soxr/rules.mak
@@ -36,7 +36,6 @@ endif
rm -f $</CMakeCache.txt
cd $< && $(HOSTVARS_PIC) $(CMAKE) \
$(SOXR_EXTRA_CONF) \
- -DBUILD_SHARED_LIBS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTS=OFF \
-DWITH_LSR_BINDINGS=OFF \
diff --git a/contrib/src/taglib/rules.mak b/contrib/src/taglib/rules.mak
index b967b7d54f..1763f05743 100644
--- a/contrib/src/taglib/rules.mak
+++ b/contrib/src/taglib/rules.mak
@@ -22,8 +22,6 @@ taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib
$(MOVE)
.taglib: taglib toolchain.cmake
- cd $< && $(HOSTVARS_PIC) $(CMAKE) \
- -DBUILD_SHARED_LIBS:BOOL=OFF \
- .
+ cd $< && $(HOSTVARS_PIC) $(CMAKE) .
cd $< && $(MAKE) install
touch $@
More information about the vlc-commits
mailing list