1*1e04f449SAlexander Hansenproject('iniparser', 'c')
2*1e04f449SAlexander Hansen
3*1e04f449SAlexander Hansen# We create a directory for the include files to be able to include
4*1e04f449SAlexander Hansen# iniparser/iniparser.h and not just iniparser.h
5*1e04f449SAlexander Hansen# Because in case of iniparser being already installed, it is iniparser/iniparser.h
6*1e04f449SAlexander Hansen
7*1e04f449SAlexander Hanseninc = 'iniparser-include'
8*1e04f449SAlexander Hansen
9*1e04f449SAlexander Hansenrun_command('sh', '-c', 'mkdir -p iniparser-include/iniparser')
10*1e04f449SAlexander Hansenrun_command('sh', '-c', 'cp -r src/* iniparser-include/iniparser/')
11*1e04f449SAlexander Hansen
12*1e04f449SAlexander Hanseniniparser = shared_library('iniparser',
13*1e04f449SAlexander Hansen  'src/dictionary.c',
14*1e04f449SAlexander Hansen  'src/iniparser.c',
15*1e04f449SAlexander Hansen  include_directories : inc,
16*1e04f449SAlexander Hansen  install : true)
17*1e04f449SAlexander Hansen
18*1e04f449SAlexander Hanseniniparser_dep = declare_dependency(include_directories : inc,
19*1e04f449SAlexander Hansen  link_with : iniparser)
20