From 8bba62fc8c519cc782ac2e917743f0efd36f2a4e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 4 Mar 2025 23:39:38 +0100 Subject: Make native arch, symlink optional --- meson.build | 8 ++++++-- meson_options.txt | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index c3f8d7a..a2446a1 100644 --- a/meson.build +++ b/meson.build @@ -85,7 +85,9 @@ prefix = get_option('prefix') datadir = get_option('datadir') qm_resources_path = join_paths(prefix, datadir, 'quickmedia') -add_project_arguments('-march=native', language: ['c', 'cpp']) +if get_option('native_arch') == true + add_project_arguments('-march=native', language: ['c', 'cpp']) +endif executable( meson.project_name(), @@ -123,7 +125,9 @@ install_data(files('boards.json'), install_dir : qm_resources_path) install_data(files('example-config.json'), install_dir : qm_resources_path) install_data(files('README.md'), install_dir : qm_resources_path) -install_symlink('qm', install_dir : join_paths(prefix, 'bin'), pointing_to: join_paths(prefix, 'bin', meson.project_name())) +if get_option('install_symlink') == true + install_symlink('qm', install_dir : join_paths(prefix, 'bin'), pointing_to: join_paths(prefix, 'bin', meson.project_name())) +endif if get_option('install_emoji') == true meson.add_install_script('meson_post_install.sh') diff --git a/meson_options.txt b/meson_options.txt index 7a644f4..0232def 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,3 @@ +option('native_arch', type : 'boolean', value : true, description : 'Build specifically for your own cpu for best performance') +option('install_symlink', type : 'boolean', value : true, description : 'Install a symlink for qm to quickmedia') option('install_emoji', type : 'boolean', value : true, description : 'Download and install emoji') -- cgit v1.2.3-70-g09d2