Open Xephobia opened 3 years ago
In my project I added a Git submodule into include/sleepy-discord
, then added this to my CMakeLists.txt
:
ADD_SUBDIRECTORY(include/sleepy-discord)
# ...
TARGET_LINK_LIBRARIES(${PROJECT_NAME} sleepy-discord)
Then I run cmake
and it configured everything for me automatically. After all I was able to include it in my code.
CMake won't recompile entire project along with dependencies every time you run make
, so it'll spare you some time.
Hello, we all know that compilation speed is a major bottleneck in c++. You can reduce greatly this problem by using precompiled headers. I have been able to staticly compile sleepy_discord to libsleepy-discord.a simply by running cmake. Hoever i am unable to use that static lib in my own project (i'm not a c++ pro) could you give instruction how to do this?