[vlc-commits] [Git][videolan/vlc][master] 10 commits: meson: add d3d11_common library
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Jan 11 08:58:57 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
22115f5c by Steve Lhomme at 2023-01-11T07:57:22+00:00
meson: add d3d11_common library
- - - - -
8365a522 by Steve Lhomme at 2023-01-11T07:57:22+00:00
meson: fix dxgi screen plugin link
- - - - -
fbb26504 by Steve Lhomme at 2023-01-11T07:57:22+00:00
meson: remove inline ASM forced O2 until it's supported
And then the option should only be set when inline ASM is enabled.
- - - - -
d68acac5 by Steve Lhomme at 2023-01-11T07:57:22+00:00
meson: disable tests using alarm() on Windows
- - - - -
d11caffa by Steve Lhomme at 2023-01-11T07:57:22+00:00
meson: fix hpackenc_test build on Windows
strcasecmp is missing when linking.
- - - - -
a16337c7 by Steve Lhomme at 2023-01-11T07:57:22+00:00
meson: fix http test linking with clang-cl
The linker complains about duplicate symbols already found in vlc_http_lib.
- - - - -
90efc050 by Steve Lhomme at 2023-01-11T07:57:22+00:00
meson: add specific folder for missing includes in the Windows SDK
- - - - -
9f36f8d7 by Steve Lhomme at 2023-01-11T07:57:22+00:00
win32: provide a unistd.h when compiling with the Windows SDK
- - - - -
86611b34 by Steve Lhomme at 2023-01-11T07:57:22+00:00
win32: provide a dirent.h when compiling with the Windows SDK
We don't need actual implementations as none of the dirent API ends up being
used in Windows builds.
- - - - -
6424f545 by Steve Lhomme at 2023-01-11T07:57:22+00:00
meson: enable error on missing function declaration
This is also enabled in configure.ac.
- - - - -
8 changed files:
- + compat/windows/dirent.h
- + compat/windows/unistd.h
- meson.build
- modules/access/http/meson.build
- modules/access/screen/meson.build
- modules/codec/meson.build
- modules/video_chroma/meson.build
- modules/video_filter/meson.build
Changes:
=====================================
compat/windows/dirent.h
=====================================
@@ -0,0 +1,17 @@
+// Copyright © 2023 VideoLabs, VLC authors and VideoLAN
+// SPDX-License-Identifier: ISC
+//
+// Authors: Steve Lhomme <robux4 at videolabs.io>
+
+#ifndef WINSDK_DIRENT_H__
+#define WINSDK_DIRENT_H__
+
+// Windows is not a real POSIX system and doesn't provide this header
+// provide a dummy one so the code can compile
+
+// opaque type for all dirent entries
+typedef void DIR;
+
+#define opendir(x) (NULL)
+
+#endif // WINSDK_DIRENT_H__
=====================================
compat/windows/unistd.h
=====================================
@@ -0,0 +1,29 @@
+// Copyright © 2023 VideoLabs, VLC authors and VideoLAN
+// SPDX-License-Identifier: ISC
+//
+// Authors: Steve Lhomme <robux4 at videolabs.io>
+
+#ifndef WINSDK_UNISTD_H__
+#define WINSDK_UNISTD_H__
+
+// Windows is not a real POSIX system and doesn't provide this header
+// provide a dummy one so the code can compile
+
+// many functions commonly found in unistd.h are found in io.h and process.h
+#define _CRT_DECLARE_NONSTDC_NAMES 1
+#include <io.h>
+#include <process.h>
+
+// defines corresponding to stdin/stdout/stderr without the __acrt_iob_func() call
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+// _access() doesn't function the same as access(), but this should work
+#define R_OK 04
+
+// _getpid() exists but it returns an int, not a pid_t
+typedef int pid_t;
+
+
+#endif // WINSDK_UNISTD_H__
=====================================
meson.build
=====================================
@@ -42,7 +42,6 @@ vlc_src_root = meson.current_source_dir()
vlc_build_root = meson.current_build_dir()
cdata = configuration_data()
-vlc_include_dirs = include_directories('.', 'include')
gen_vlc_about = find_program('buildsystem/gen-vlc-about.py')
vlc_about = custom_target('vlc_about.h',
@@ -90,6 +89,13 @@ cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')
host_system = host_machine.system()
+list_inc_dirs = ['.', 'include']
+if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
+ # extra POSIX headers not found in the Windows SDK
+ list_inc_dirs += 'compat/windows'
+endif
+vlc_include_dirs = include_directories(list_inc_dirs)
+
if host_system == 'darwin'
add_languages('objc', native: false)
add_project_arguments('-mmacosx-version-min=10.11',
@@ -365,6 +371,12 @@ if host_system == 'windows'
endif
+if cc.has_argument('-Werror-implicit-function-declaration')
+ add_project_arguments('-Werror-implicit-function-declaration', language : ['c', 'cpp'])
+elif cc.has_argument('-we4013')
+ add_project_arguments('-we4013', language : ['c', 'cpp'])
+endif
+
#
# Check if other libs are needed
#
=====================================
modules/access/http/meson.build
=====================================
@@ -35,6 +35,7 @@ hpack_test = executable('hpack_test',
hpackenc_test = executable('hpackenc_test',
files('hpack.c', 'hpackenc.c'),
c_args : ['-DENC_TEST'],
+ link_with : vlc_libcompat,
include_directories : [vlc_include_dirs])
h2frame_test = executable('h2frame_test',
files(
@@ -61,11 +62,11 @@ h1chunked_test = executable('h1chunked_test',
link_with : vlc_http_lib,
include_directories : [vlc_include_dirs])
http_msg_test = executable('http_msg_test',
- files('message_test.c', 'message.c'),
+ files('message_test.c'),
link_with : vlc_http_lib,
include_directories : [vlc_include_dirs])
http_file_test = executable('http_file_test',
- files('file_test.c', 'message.c', 'resource.c', 'file.c'),
+ files('file_test.c'),
link_with : vlc_http_lib,
include_directories : [vlc_include_dirs])
http_tunnel_test = executable('http_tunnel_test',
=====================================
modules/access/screen/meson.build
=====================================
@@ -22,7 +22,7 @@ if get_option('screen').allowed()
screen_files += files('win32.c', 'dxgi.cpp')
gdi32_dep = cc.find_library('gdi32')
screen_deps += [gdi32_dep]
- screen_link_with += d3d9_common_lib
+ screen_link_with += d3d11_common_lib
else
screen_files += files('mac.c')
applicationservices_dep = dependency('ApplicationServices', required: true)
=====================================
modules/codec/meson.build
=====================================
@@ -618,6 +618,19 @@ endif
# D3D9 common library
# TODO: Do not build for Winstore
if host_system == 'windows'
+ d3d11_common_lib = static_library('d3d11_common',
+ files(
+ '../video_chroma/d3d11_fmt.c',
+ '../video_chroma/dxgi_fmt.c',
+ ),
+ include_directories: [vlc_include_dirs],
+ pic: true,
+ install: false,
+ dependencies: [
+ cc.find_library('dxguid'),
+ cc.find_library('wbemuuid'),
+ ]
+ )
d3d9_common_lib = static_library('d3d9_common',
files(
'../video_chroma/d3d9_fmt.c',
=====================================
modules/video_chroma/meson.build
=====================================
@@ -128,6 +128,7 @@ endif
## Tests
+if host_system != 'windows' # can't use alarm
# Chroma copy SSE test
chroma_copy_sse_test = executable(
'chroma_copy_sse_test',
@@ -147,3 +148,4 @@ chroma_copy_test = executable(
include_directories: [vlc_include_dirs]
)
test('chroma_copy', chroma_copy_test, suite: 'video_chroma')
+endif
=====================================
modules/video_filter/meson.build
=====================================
@@ -285,7 +285,7 @@ vlc_modules += {
'deinterlace/algo_ivtc.c',
),
# Inline ASM doesn't build with -O0
- 'c_args' : ['-O2'],
+ # bring back if needed when inline ASM is supported 'c_args' : ['-O2'],
'link_with' : [deinterlacecommon_lib]
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0b74c9cb082a29eb9fa25b192a0fda85f84d3b9c...6424f5452e6b34f4a9c88d8d89adcab7145d20a0
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0b74c9cb082a29eb9fa25b192a0fda85f84d3b9c...6424f5452e6b34f4a9c88d8d89adcab7145d20a0
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