Open QWERTIOX opened 3 days ago
of course sanity checks pass on local machine...
You forgot to update releases.json
.
As for the meson_version: '>=1.0.1'
requirement, there's no reason for it.
wait, i include whole directory and not just .h file
Why?
because it was including junk like readme.md and I could't find another way to move this header file or force including just header file
If by included, you mean add the directory to the include flags, yes… So? You're afraid someone is going to use #include <README.md>
?
And you could have just used fs.copyfile
to copy the include to an include
sub-directory at setup.
i tried and it didn't see the include directory
Please post the code you used.
project(
'zpp_bits',
'cpp',
version: '4.4.22',
license: 'MIT',
)
fs = import('fs')
copy = fs.copyfile('zpp_bits.h', 'include')
incdir = include_directories('include')
zpp_bits_dep = declare_dependency(include_directories: include_directories())
That's not how fs.copyfile
work:
dest str: the name of the output file. If unset will be the basename of the src argument
Try something like this:
meson.build
project(
'zpp_bits',
'cpp',
version: '4.4.22',
license: 'MIT',
meson_version: '>=0.64.0',
)
subdir('include')
zpp_bits_dep = declare_dependency(include_directories: incdir)
- `include/meson.build`:
```meson
copy = import('fs').copyfile('../zpp_bits.h')
incdir = include_directories('.')
(And go back to the original upstream source distribution).
i think meson.build will still be included this way
What do you mean included? declare_dependency
is not creating an archive.
i mean it's in the same directory as header
IHMO, you could have kept the original code. The real use case for fs.copyfile
with respect to headers is to avoid making private headers accessible when they are mixed with public ones, particularly things like headers with generic names, like config.h
.
i mean it's in the same directory as header
So? You'll have multiple instances of that in the wraps provided (with makefiles, source files…). Unless someone is foolish enough to try to include<meson.build>
, what is the harm exactly?
maybe i'm perfectionist but i don't like that my tools reports that meson.build is one of the headers ready to be included
but as you mentioned, other wraps do that so now i don't care
of course i'm stupid - i forget to set c++ at least to c++20
I'm not sure if meson_version: '>=1.0.1' should be so high but this is the one i'm using right now