Closed nreilly closed 3 months ago
Hello,
I'm trying to get this to compile on FreeBSD (having never used meson/C++/etc before) and have managed to get it to work if I add:
incdir = include_directories('/usr/local/include/doctest')
and modify the testrunner executable() to include the include_directories
executable('testrunner', 'testrunner.cc', 'notifiers.cc', 'minicurl.cc', 'dnsmon.cc', 'record-types.cc', 'dnsmessages.cc', 'dns-storage.cc', 'netmon.cc', 'luabridge.cc', dependencies: [doctest_dep, curl_dep, json_dep, fmt_dep, cpphttplib, simplesockets_dep, lua_dep], include_directories: incdir)
Is this something that can be added in a portable way? Maybe something like:
if host_machine.system() in ['freebsd'] incdir = include_directories('/usr/local/include/doctest') executable('testrunner', 'testrunner.cc', 'notifiers.cc', 'minicurl.cc', 'dnsmon.cc', 'record-types.cc', 'dnsmessages.cc', 'dns-storage.cc', 'netmon.cc', 'luabridge.cc', dependencies: [doctest_dep, curl_dep, json_dep, fmt_dep, cpphttplib, simplesockets_dep, lua_dep], include_directories: incdir) else executable('testrunner', 'testrunner.cc', 'notifiers.cc', 'minicurl.cc', 'dnsmon.cc', 'record-types.cc', 'dnsmessages.cc', 'dns-storage.cc', 'netmon.cc', 'luabridge.cc', dependencies: [doctest_dep, curl_dep, json_dep, fmt_dep, cpphttplib, simplesockets_dep, lua_dep]) endif
As testrunner has now been commented out of the standard meson.build file, this is no longer a problem.
Hello,
I'm trying to get this to compile on FreeBSD (having never used meson/C++/etc before) and have managed to get it to work if I add:
and modify the testrunner executable() to include the include_directories
Is this something that can be added in a portable way? Maybe something like: