zyppe revised this gist 1 month ago. Go to revision
2 files changed, 24 insertions
meson.build(file created)
| @@ -0,0 +1,18 @@ | |||
| 1 | + | project('dfm-proj', 'cpp', version: '0.1', default_options: ['cpp_std=c++17']) | |
| 2 | + | user_path=get_option('eigen_path') | |
| 3 | + | if user_path != '' | |
| 4 | + | message('Using custom Eigen path: ' + user_path) | |
| 5 | + | eigen_dep = declare_dependency(include_directories : include_directories(user_path)) | |
| 6 | + | else | |
| 7 | + | message('No custom path provided, searching in system...') | |
| 8 | + | eigen_dep = dependency('eigen5', required : false) | |
| 9 | + | ||
| 10 | + | if not eigen_dep.found() | |
| 11 | + | error('Eigen not found! Please specify path with: -Deigen_path=/path/to/eigen') | |
| 12 | + | endif | |
| 13 | + | endif | |
| 14 | + | ||
| 15 | + | ||
| 16 | + | executable('dfm', | |
| 17 | + | 'main.cpp', | |
| 18 | + | dependencies : eigen_dep) | |
meson_options.txt(file created)
| @@ -0,0 +1,6 @@ | |||
| 1 | + | option( | |
| 2 | + | 'eigen_path', | |
| 3 | + | type: 'string', | |
| 4 | + | value: '', | |
| 5 | + | description: 'Absolute path of Eigen' | |
| 6 | + | ) | |
Newer
Older