Tomi Valkeinen | ccd3eb0 | 2020-09-05 10:54:18 +0300 | [diff] [blame] | 1 | project('kms++', 'cpp', |
| 2 | default_options : [ |
| 3 | 'cpp_std=c++17', |
| 4 | ], |
| 5 | ) |
| 6 | |
| 7 | cpp = meson.get_compiler('cpp') |
| 8 | cpp_arguments = [] |
| 9 | |
| 10 | if (cpp.get_id() == 'gcc' and |
| 11 | host_machine.cpu_family() == 'arm' and |
| 12 | cpp.has_argument('-Wno-psabi')) |
| 13 | cpp_arguments += [ |
| 14 | '-Wno-psabi', |
| 15 | ] |
| 16 | endif |
| 17 | |
| 18 | if cpp.has_argument('-Wno-c99-designator') |
| 19 | cpp_arguments += [ |
| 20 | '-Wno-c99-designator', |
| 21 | ] |
| 22 | endif |
| 23 | |
| 24 | add_project_arguments(cpp_arguments, language : 'cpp') |
| 25 | |
Tomi Valkeinen | 7026548 | 2020-09-29 16:43:35 +0300 | [diff] [blame] | 26 | link_arguments = [] |
| 27 | |
| 28 | if get_option('static-libc') |
| 29 | link_arguments += ['-static-libgcc', '-static-libstdc++'] |
| 30 | endif |
| 31 | |
| 32 | add_global_link_arguments(link_arguments, language : 'cpp') |
| 33 | |
Tomi Valkeinen | fdffbcd | 2020-12-01 11:25:52 +0200 | [diff] [blame] | 34 | libfmt_dep = dependency('fmt') |
Tomi Valkeinen | ccd3eb0 | 2020-09-05 10:54:18 +0300 | [diff] [blame] | 35 | |
Tomi Valkeinen | ccd3eb0 | 2020-09-05 10:54:18 +0300 | [diff] [blame] | 36 | libdrmomap_dep = dependency('libdrm_omap', required : get_option('omap')) |
| 37 | |
| 38 | subdir('kms++') |
Tomi Valkeinen | cda4a49 | 2020-10-20 16:34:57 +0300 | [diff] [blame] | 39 | |
Tomi Valkeinen | b12aab5 | 2020-12-18 15:01:45 +0200 | [diff] [blame] | 40 | if get_option('libutils') |
Tomi Valkeinen | cda4a49 | 2020-10-20 16:34:57 +0300 | [diff] [blame] | 41 | subdir('kms++util') |
Tomi Valkeinen | b12aab5 | 2020-12-18 15:01:45 +0200 | [diff] [blame] | 42 | endif |
| 43 | |
| 44 | if get_option('utils') |
Tomi Valkeinen | cda4a49 | 2020-10-20 16:34:57 +0300 | [diff] [blame] | 45 | subdir('utils') |
| 46 | endif |
| 47 | |
Tomi Valkeinen | ccd3eb0 | 2020-09-05 10:54:18 +0300 | [diff] [blame] | 48 | subdir('py') |
| 49 | |
| 50 | if get_option('kmscube') |
| 51 | subdir('kmscube') |
| 52 | endif |