2021-09-17 15:07:23 -07:00
|
|
|
# SPDX-FileCopyrightText: 2021 Andrea Pappacoda
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
|
|
project(
|
|
|
|
'xbyak',
|
|
|
|
'cpp',
|
2024-11-11 00:03:36 -07:00
|
|
|
version: '7.22',
|
2021-09-17 15:07:23 -07:00
|
|
|
license: 'BSD-3-Clause',
|
|
|
|
default_options: 'b_ndebug=if-release'
|
|
|
|
)
|
|
|
|
|
2024-03-09 13:51:48 -07:00
|
|
|
install_subdir('xbyak', install_dir: get_option('includedir'))
|
2021-09-17 15:07:23 -07:00
|
|
|
|
|
|
|
xbyak_dep = declare_dependency(include_directories: include_directories('.'))
|
|
|
|
|
|
|
|
if meson.version().version_compare('>=0.54.0')
|
2021-10-05 01:17:06 -07:00
|
|
|
meson.override_dependency(meson.project_name(), xbyak_dep)
|
2021-09-17 15:07:23 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
import('pkgconfig').generate(
|
2021-10-05 01:17:06 -07:00
|
|
|
name: meson.project_name(),
|
2021-09-17 15:07:23 -07:00
|
|
|
description: 'JIT assembler for x86(IA32), x64(AMD64, x86-64)',
|
|
|
|
version: meson.project_version(),
|
2024-08-28 07:35:38 -07:00
|
|
|
url: 'https://github.com/herumi/xbyak'
|
2021-09-17 15:07:23 -07:00
|
|
|
)
|
2021-10-05 01:17:06 -07:00
|
|
|
|
2024-08-28 07:35:38 -07:00
|
|
|
if meson.version().version_compare('>=0.50.0')
|
2021-10-05 01:17:06 -07:00
|
|
|
cmake = import('cmake')
|
2021-10-06 00:27:08 -07:00
|
|
|
|
2021-10-05 01:17:06 -07:00
|
|
|
cmake.write_basic_package_version_file(
|
|
|
|
name: meson.project_name(),
|
2024-08-28 07:35:38 -07:00
|
|
|
version: meson.project_version()
|
2021-10-05 01:17:06 -07:00
|
|
|
)
|
2021-10-06 00:27:08 -07:00
|
|
|
|
2021-10-05 01:17:06 -07:00
|
|
|
cmake_conf = configuration_data()
|
|
|
|
cmake_conf.set('TARGET_NAME', meson.project_name() + '::' + meson.project_name())
|
2021-10-10 12:28:28 -07:00
|
|
|
cmake_conf.set('ABSOLUTE_INCLUDE_DIR', get_option('prefix')/get_option('includedir'))
|
2021-10-06 00:27:08 -07:00
|
|
|
|
2021-10-05 01:17:06 -07:00
|
|
|
cmake.configure_package_config_file(
|
|
|
|
name: meson.project_name(),
|
|
|
|
input: 'cmake'/'meson-config.cmake.in',
|
2024-08-28 07:35:38 -07:00
|
|
|
configuration: cmake_conf
|
2021-10-05 01:17:06 -07:00
|
|
|
)
|
|
|
|
endif
|