'cmake : shared library or sub-prjoect

I am builfing a new c++ project and i want to integrate cmake and i dont know what is the best approach i have to follow my project tree looks like this :

.
├── http
|   ├── include
|   |   └── http.h
|   |
|   └── src
|       ├── http.cpp
|       └── main.cpp
├── dns
|   ├── include
|   |   └── dns.h
|   |
|   └── src
|       ├── dns.cpp
|       └── main.cpp
...

I dont really dont know what to do and i m not quite familiar with cmake

  1. doing a shared library from every directory and link them together in cmake file
  2. a sub-project for every directory .


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source