Tectu / malloy

A cross-platform C++20 library providing embeddable server & client components for HTTP and WebSocket.
BSD 3-Clause "New" or "Revised" License
68 stars 8 forks source link

Question about directory structure #23

Closed 0x00002a closed 3 years ago

0x00002a commented 3 years ago

So this library uses a single lib directory which is quite unusual. I'm wondering if there is a specific reason behind this? Not really opposed to it but for packaging purposes for example, having an include directory would make life easier.

Tectu commented 3 years ago

Very personal & subjective: Personal experience showed that having sources split up into include and src directories rather than component-wise directories makes it harder to maintain for larger projects.

The idea is to use cpack for packaging. That's how I do it with other libraries (including older/smaller libraries that do have a dedicated include directory).

cpack integration relies on install targets which are not there yet. I can very easily add those as I already spent hours figuring out how to do that properly :p Together with that the library should also allow building static and shared libraries instead of just the object library. That's all on the ToDo list and I'll get to that eventually. I can bump it up in priority. When doing that I will most likely tackle at the same time splitting the library into server and client libraries.