[vlc-commits] [Git][videolan/vlc][master] 7 commits: libvlc: always include the libvlc version header from vlc.h
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Nov 29 07:48:41 UTC 2022
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
8c2b60de by Steve Lhomme at 2022-11-29T07:06:26+00:00
libvlc: always include the libvlc version header from vlc.h
Just like the other libvlc headers.
- - - - -
d111a29a by Steve Lhomme at 2022-11-29T07:06:26+00:00
configure: add global build values for the libtool version-info
See https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
- - - - -
362d50a9 by Steve Lhomme at 2022-11-29T07:06:26+00:00
libvlc: dissociate the libvlc version from the libvlccore/VLC package version
The values should be about libvlc and nothing else.
- - - - -
a89da890 by Steve Lhomme at 2022-11-29T07:06:26+00:00
configure: compute the .so version from the libtool version-info
- - - - -
c0f2b668 by Steve Lhomme at 2022-11-29T07:06:26+00:00
configure: decode the libtool version-info from the .so version name
And not the (confusing) other way around.
- - - - -
ebe945df by Steve Lhomme at 2022-11-29T07:06:26+00:00
lib: use libtool -version-number instead of -version-info
This allows using more common major/minor/micro values.
- - - - -
79d10fb8 by Steve Lhomme at 2022-11-29T07:06:26+00:00
configure: remove unused LIBVLC_ABI_LT_xxx values
- - - - -
6 changed files:
- configure.ac
- doc/libvlc/CMakeLists.txt
- extras/ci/gitlab-ci.yml
- include/vlc/libvlc_version.h.in
- include/vlc/vlc.h
- lib/Makefile.am
Changes:
=====================================
configure.ac
=====================================
@@ -9,6 +9,11 @@ VERSION_REVISION=0
VERSION_EXTRA=0
VERSION_DEV=dev
+# libvlc .so version values
+LIBVLC_ABI_MAJOR=12
+LIBVLC_ABI_MINOR=0
+LIBVLC_ABI_MICRO=0
+
PKGDIR="vlc"
AC_SUBST([PKGDIR])
@@ -4632,6 +4637,9 @@ AC_SUBST([VERSION_MAJOR])
AC_SUBST([VERSION_MINOR])
AC_SUBST([VERSION_REVISION])
AC_SUBST([VERSION_EXTRA])
+AC_SUBST([LIBVLC_ABI_MAJOR])
+AC_SUBST([LIBVLC_ABI_MINOR])
+AC_SUBST([LIBVLC_ABI_MICRO])
AC_SUBST([COPYRIGHT_YEARS])
AS_IF([test -z "$VLC_COMPILE_BY"],[
VLC_COMPILE_BY=`whoami|sed -e 's/\\\/\\\\\\\/g'`
=====================================
doc/libvlc/CMakeLists.txt
=====================================
@@ -19,7 +19,7 @@ project("libvlc samples")
# define the libvlc external build
add_library(libvlc SHARED IMPORTED GLOBAL)
-target_include_directories(libvlc INTERFACE "${LIBVLC_SDK_INC}")
+target_include_directories(libvlc INTERFACE ${LIBVLC_SDK_INC})
if (MSVC)
set_target_properties(libvlc PROPERTIES IMPORTED_IMPLIB "${LIBVLC_SDK_LIB}/libvlc.lib")
else ()
=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -146,7 +146,7 @@ variables:
fi
extras/package/win32/build.sh -a $HOST_ARCH $EXTRA_BUILD_FLAGS $LIBVLC_EXTRA_BUILD_FLAGS $UWP_EXTRA_BUILD_FLAGS
if [ "${CI_JOB_NAME}" = "win64" ]; then
- cmake -DLIBVLC_SDK_INC:STRING=${CI_PROJECT_DIR}/include -DLIBVLC_SDK_LIB:STRING=${CI_PROJECT_DIR}/${VLCARCH}/lib/.libs -H${CI_PROJECT_DIR}/doc/libvlc -B${CI_PROJECT_DIR}/doc/libvlc/build \
+ cmake -DLIBVLC_SDK_INC:STRING="${CI_PROJECT_DIR}/include;${CI_PROJECT_DIR}/${VLCARCH}/include" -DLIBVLC_SDK_LIB:STRING=${CI_PROJECT_DIR}/${VLCARCH}/lib/.libs -H${CI_PROJECT_DIR}/doc/libvlc -B${CI_PROJECT_DIR}/doc/libvlc/build \
-G Ninja -DCMAKE_C_COMPILER=${TRIPLET}-gcc -DCMAKE_CXX_COMPILER=${TRIPLET}-g++ -DCMAKE_SYSTEM_NAME=Windows
cmake --build ${CI_PROJECT_DIR}/doc/libvlc/build
fi
=====================================
include/vlc/libvlc_version.h.in
=====================================
@@ -52,4 +52,28 @@
LIBVLC_VERSION(LIBVLC_VERSION_MAJOR, LIBVLC_VERSION_MINOR, \
LIBVLC_VERSION_REVISION, LIBVLC_VERSION_EXTRA)
+
+/** LibVLC ABI major version number, updated when incompatible changes are added */
+# define LIBVLC_ABI_VERSION_MAJOR (@LIBVLC_ABI_MAJOR@)
+
+/** LibVLC ABI minor version number, updated when compatible changes are added */
+# define LIBVLC_ABI_VERSION_MINOR (@LIBVLC_ABI_MINOR@)
+
+/** LibVLC ABI micro version number, updated with new releases */
+# define LIBVLC_ABI_VERSION_MICRO (@LIBVLC_ABI_MICRO@)
+
+/** LibVLC full ABI version combining the major VLC version and the .so version:
+ * - A 0xFF000000 mask gives the VLC major version,
+ * - A 0x00FF0000 mask gives the LibVLC major ABI version,
+ * - A 0x0000FF00 mask gives the LibVLC minor ABI version,
+ * - A 0x000000FF mask gives the LibVLC ABI revision.
+ *
+ * LibVLC is considered compatible with your code if the VLC major and LibVLC
+ * major values are equal and the minor ABI version is equal or higher than the
+ * value you compiled with.
+ */
+# define LIBVLC_ABI_VERSION_INT \
+ LIBVLC_VERSION(LIBVLC_VERSION_MAJOR, LIBVLC_ABI_VERSION_MAJOR, \
+ LIBVLC_ABI_VERSION_MINOR, LIBVLC_ABI_VERSION_MICRO )
+
#endif
=====================================
include/vlc/vlc.h
=====================================
@@ -46,6 +46,7 @@ extern "C" {
#include <vlc/libvlc_media_discoverer.h>
#include <vlc/libvlc_events.h>
#include <vlc/libvlc_dialog.h>
+#include <vlc/libvlc_version.h>
#include <vlc/deprecated.h>
# ifdef __cplusplus
=====================================
lib/Makefile.am
=====================================
@@ -61,7 +61,7 @@ libvlc_la_LIBADD = ../src/libvlccore.la ../compat/libcompat.la $(LIBM)
libvlc_la_LDFLAGS = \
$(LDFLAGS_libvlc) \
-no-undefined \
- -version-info 12:0:0 \
+ -version-number @LIBVLC_ABI_MAJOR@:@LIBVLC_ABI_MINOR@:@LIBVLC_ABI_MICRO@ \
-export-symbols $(srcdir)/libvlc.sym
libvlc_la_DEPENDENCIES = libvlc.sym
if HAVE_WIN32
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6aab42ab61e5bb95bf36f1ad65aff35b711b0fba...79d10fb8cb7271d9789c18282e2380f1fe98fc6b
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6aab42ab61e5bb95bf36f1ad65aff35b711b0fba...79d10fb8cb7271d9789c18282e2380f1fe98fc6b
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