aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build8
-rw-r--r--meson_options.txt2
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')