project('me.sergiotarxz.elfspy', 'cpp') pkg = import('pkgconfig') sources = [ 'Call.cpp', 'Hook.cpp', 'Report.cpp', 'ELFInfo.cpp', 'SPY.cpp', 'Error.cpp', 'SectionHeader.cpp', 'GOTEntry.cpp', 'Fail.cpp', 'MFile.cpp', ] headers = [ './elfspy/Capture.h', './elfspy/HookImpl.h', './elfspy/Thunk.h', './elfspy/MFile.h', './elfspy/Lambda.h', './elfspy/Method.h', './elfspy/Profiler.h', './elfspy/GOTEntry.h', './elfspy/MethodInfo.h', './elfspy/Section.h', './elfspy/ELFObject.h', './elfspy/Call.h', './elfspy/SectionHeader.h', './elfspy/Variadic.h', './elfspy/MethodPointer.h', './elfspy/Fail.h', './elfspy/Result.h', './elfspy/ThunkHandle.h', './elfspy/Report.h', './elfspy/SPY.h', './elfspy/Fake.h', './elfspy/Error.h', './elfspy/Hook.h', './elfspy/ELFInfo.h', './elfspy/Function.h', './elfspy/HookBase.h', './elfspy/Arg.h', ] elfspylib = library('elfspy', sources, install : true, include_directories: ['.'], c_args: ['-fPIC', '-O0', '-g'], ) install_headers(headers, subdir: 'elfspy') pkg.generate(elfspylib) elfspy_dep = declare_dependency ( include_directories: ['.'], link_with: elfspylib )