ref: b5f87777fd56136fdccd397daa394c3834a75e89
parent: 86515484810e3435294a37d279067023095a8c01
parent: 3f5faec158c71a8a22bc98ced691aaa77770006e
author: guangwei <GuangweiWang@users.noreply.github.com>
date: Fri Apr 27 09:47:55 EDT 2018
Merge pull request #2960 from sarum9in/master Use internal meson features and fix indentation
--- a/filecopier.py
+++ /dev/null
@@ -1,7 +1,0 @@
-#!/usr/bin/env python3
-
-import sys
-import shutil
-
-shutil.copyfile(sys.argv[1], sys.argv[2])
-shutil.copymode(sys.argv[1], sys.argv[2])
--- a/filesymlinker.py
+++ /dev/null
@@ -1,9 +1,0 @@
-#!/usr/bin/env python3
-
-import sys
-import os
-
-try:
- os.symlink(sys.argv[1], sys.argv[2])
-except:
- pass
--- a/include/wels/meson.build
+++ b/include/wels/meson.build
@@ -1,9 +1,8 @@
api_header_deps
foreach header : api_headers
- api_header_deps += custom_target(header[0],
- build_by_default: true,
+ api_header_deps += configure_file(
input : header[1],
output : header[0],
- command : [filecopier, '@INPUT@', '@OUTPUT@'])
+ configuration : configuration_data())
endforeach
--- a/meson.build
+++ b/meson.build
@@ -53,7 +53,6 @@
c_args = []
cpp_args = []
asm_args = []
-shared_lib_suffix = ''
if system == 'linux'
if cpu_family == 'x86'
@@ -69,8 +68,6 @@
deps += [cpp.find_library('libm')]
- shared_lib_suffix = 'so.@0@'.format(meson.project_version())
-
asm_args += ['-DHAVE_AVX2']
add_project_arguments('-DHAVE_AVX2', language: 'cpp')
add_project_arguments('-DHAVE_AVX2', '-DX86_ASM', language: 'c')
@@ -112,7 +109,8 @@
libopenh264_shared = shared_library('openh264',
objects: all_objects,
install: true,
- name_suffix: shared_lib_suffix,
+ soversion: major_version,
+ version: meson.project_version(),
dependencies: deps)
libopenh264_static = static_library('openh264',
@@ -151,22 +149,4 @@
include_directories: include_directories('include'),
dependencies: deps + api_header_deps)
-if system == 'linux'
- filesymlinker = find_program('filesymlinker.py')
- res = custom_target('libopenh264.so',
- build_by_default: true,
- input : libopenh264_shared,
- output : 'libopenh264.so',
- command : [filesymlinker, '@INPUT@', '@OUTPUT@'])
-
- res = custom_target('libopenh264.so.@0@'.format(major_version),
- build_by_default: true,
- input : libopenh264_shared,
- output : 'libopenh264.so.@0@'.format(major_version),
- command : [filesymlinker, '@INPUT@', '@OUTPUT@'])
-
- meson.add_install_script('post_install.py', get_option('libdir'), shared_lib_suffix, major_version)
-endif
-
-filecopier = find_program('filecopier.py')
subdir ('include')
--- a/post_install.py
+++ /dev/null
@@ -1,20 +1,0 @@
-#!/usr/bin/env python3
-
-import sys
-import os
-
-destdir_prefix = os.environ['MESON_INSTALL_DESTDIR_PREFIX']
-libdir = os.path.join(destdir_prefix, sys.argv[1])
-suffix = sys.argv[2]
-major_version = sys.argv[3]
-
-try:
- os.symlink('libopenh264.{}'.format(suffix), os.path.join(libdir, 'libopenh264.so.{}'.format(major_version)))
-except:
- pass
-
-try:
- os.symlink('libopenh264.so.{}'.format(major_version), os.path.join(libdir, 'libopenh264.so'))
-except:
- pass
-
--- a/test/api/meson.build
+++ b/test/api/meson.build
@@ -21,7 +21,7 @@
e = executable('test_api', test_sources,
dependencies : gtest_dep,
include_directories: [inc, test_inc],
- cpp_args: cpp_args,
+ cpp_args: cpp_args,
link_with: [libcommon, libencoder, libdecoder, libprocessing])
test('api', e,
--- a/test/encoder/meson.build
+++ b/test/encoder/meson.build
@@ -25,7 +25,7 @@
e = executable('test_encoder', test_sources + test_data_generator_sources + test_base_encoder_sources,
dependencies : gtest_main_dep,
include_directories: [inc, test_inc, encoder_inc, processing_inc],
- cpp_args: cpp_args,
+ cpp_args: cpp_args,
link_with: [libcommon, libencoder, libprocessing])
test('encoder', e,