Libraries in Cmake as a project submodule

Asked

Viewed 95 times

0

I am developing a C++ project where I make use of some libraries that I produced earlier, the problem that I don’t know how to import them in this new project of mine without putting the full path in include and add all the files in my project’s cmake.
The complete project is available on Github, it has a folder called vendor which is where I intend to put all dependencies, but I need to know first how to add them to cmake.

How would you like to include: #include "Network/Socket.h"

The Archive main.cpp compiles normally because it does not need any dependency on vendor already the server.cpp needs the Network so it generates an error, and if I add manually to Cmake and include all libraries it is not feasible, because the library String has numerous files because of RSA.

1 answer

1


You should probably be referring about target_include_directories to include the headers and target_link_libraries to include library references.

  • 1

    It worked perfectly, but in view of target_include_directories I used the include_directories in pasta vendor so all libraries are included.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.