To he honest, I haven't got you structure well but answering you question - this is how you make your files executable in CMakeList.txt

What about including headers in source files, you can do it 2 ways:
- Include header by relative path, e.g.
#include "../../include/client/client.h"
What doesn't look good
- Include header by absolute path adding include directories in CMakeList.txt
include_directories(./include/client)
and include_directories(./include/server)
Note that you can write only 1 path in include_directories()
unlike you could write multiple paths in add_executable()
.
After performing such action you can simple include your header into source files by #include "client.h"
in client.cpp
and #include "server.h"
respectively.
See more in Quick CMake tutorial chapter 5.
Also you should know the difference between " "
and <>
. I'd refer to this question