diff options
author | Umang Jain <umang.jain@ideasonboard.com> | 2021-05-21 10:04:40 +0530 |
---|---|---|
committer | Umang Jain <umang.jain@ideasonboard.com> | 2021-06-28 14:12:06 +0530 |
commit | 1124e47bb94d796e17ed01a97f7bf08df81f107f (patch) | |
tree | 091e783267b1ee20838ec443b94f26e36071bf5f /meson.build | |
parent | daf1cf0c737bdee9e42a9aaf64af997609a90951 (diff) |
ipu3: Import the Intel IPA skeleton from libcamera
Import the raw Intel IPU3 IPA from libcamera master at revision
b2cc8a2f57333f. Also, copy the build enviroment and adapt the
meson.build to build the shared library.
The ipu3.cpp is now ready for integration with the Intel IPA library.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..80fb18d --- /dev/null +++ b/meson.build @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: CC0-1.0 +project('ipu3-ipa', 'c', 'cpp', + meson_version : '>= 0.55', + version : '0.0.0', + default_options : [ + 'werror=true', + 'warning_level=2', + 'cpp_std=c++17', + ], + license : 'Apache-2.0') + +ipa_name = 'intel-ipu3-ipa' + +ipa_install_dir = get_option('libdir') / 'libcamera' + +cc = meson.get_compiler('c') +libcamera_dep = dependency('libcamera') +libcamera_base = dependency('libcamera-base') +libatomic = cc.find_library('atomic', required : false) + +config_h = configuration_data() + +if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOURCE') + config_h.set('HAVE_SECURE_GETENV', 1) +endif + +configure_file(output : 'config.h', configuration : config_h) +common_arguments = [ + '-DLIBCAMERA_BASE_PRIVATE', + '-Wshadow', + '-include', 'config.h', +] + +ipa_includes = [ + include_directories('include'), +] + +c_arguments = [] +cpp_arguments = [] + +if cc.get_id() == 'clang' + if cc.version().version_compare('<5') + error('clang version is too old, ipa-ipu3 requires 5.0 or newer') + endif + + # Use libc++ by default if available instead of libstdc++ when compiling + # with clang. + if cc.find_library('libc++', required: false).found() + cpp_arguments += [ + '-stdlib=libc++', + ] + endif + + cpp_arguments += [ + '-Wextra-semi', + ] +endif + +c_arguments += common_arguments +cpp_arguments += common_arguments + +add_project_arguments(c_arguments, language : 'c') +add_project_arguments(cpp_arguments, language : 'cpp') + +ipu3_ipa_files = files([ + 'ipu3.cpp', +]) + +ipu3_ipa_deps = [ + libatomic, + libcamera_base, + libcamera_dep, +] + +subdir('src') + +mod = shared_module(ipa_name, + [ipu3_ipa_files, libcamera_helpers], + name_prefix : '', + include_directories : ipa_includes, + dependencies : ipu3_ipa_deps, + install : true, + install_dir : ipa_install_dir) |