Alexander Hansen | 1e04f44 | 2024-06-12 16:35:58 +0200 | [diff] [blame] | 1 | project('iniparser', 'c') |
| 2 | |
| 3 | # We create a directory for the include files to be able to include |
| 4 | # iniparser/iniparser.h and not just iniparser.h |
| 5 | # Because in case of iniparser being already installed, it is iniparser/iniparser.h |
| 6 | |
| 7 | inc = 'iniparser-include' |
| 8 | |
Andrew Jeffery | ab64dad | 2024-07-10 09:12:34 +0930 | [diff] [blame] | 9 | run_command('sh', '-c', 'mkdir -p iniparser-include/iniparser', check: true) |
| 10 | run_command('sh', '-c', 'cp -r src/* iniparser-include/iniparser/', check: true) |
Alexander Hansen | 1e04f44 | 2024-06-12 16:35:58 +0200 | [diff] [blame] | 11 | |
| 12 | iniparser = shared_library('iniparser', |
| 13 | 'src/dictionary.c', |
| 14 | 'src/iniparser.c', |
| 15 | include_directories : inc, |
| 16 | install : true) |
| 17 | |
| 18 | iniparser_dep = declare_dependency(include_directories : inc, |
| 19 | link_with : iniparser) |