[build2] Help with build2 project with subdirectories

Boris Kolpackov boris at codesynthesis.com
Mon Aug 21 08:03:12 UTC 2023


Matheus D via users <users at build2.org> writes:

> A more accurate tree
> 
> `
> .
> ├── build/
> │   ├── ...
> ├── buildfile
> ├── manifest
> ├── README.md
> ├── repositories.manifest
> └── sakyra/
>     ├── ds/
>     │   ├── list.c
>     │   ├── list.h
>     ├── external/
>     │   ├── miniaudio/
>     │   │   ├── miniaudio.h
>     │   ├── VulkanMemoryAllocator/
>     │   │   ├── vk_mem_alloc.h
>     │   ├── json.h
>     │   ├── stb_rect_pack.h
>     │   ├── stb_truetype.h
>     │   ├── stb_vorbis.h
>     ├── extras/
>     │   ├── audio.c
>     │   ├── audio.h
>     │   ├── text.c
>     │   ├── text.h
>     ├── buildfile
>     ├── engine.c
>     ├── engine.h
>     ├── export.h
>     ├── file.c
>     ├── file.h
>     └── version.h.in
> `
>
> error: header stb_rect_pack.h not found and no rule to generate it
>
> [...]
>
> On my Makefile, I simply do -I./sakyra/external/, and copy the tree
> as is (without the c files).

I suspect that's the part that is missing in your buildfile: if the
way you include headers assumes presence of certain header search
directories (-I...) then you will need to arrange for that in your
buildfile, something along these lines:

c.poptions += "-I$src_base/ds" "-I$src_base/external" ...



More information about the users mailing list