Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use precompiled sleepy_discord for own projects #187

Open
Xephobia opened this issue Nov 2, 2020 · 1 comment
Open

how to use precompiled sleepy_discord for own projects #187

Xephobia opened this issue Nov 2, 2020 · 1 comment

Comments

@Xephobia
Copy link

Xephobia commented Nov 2, 2020

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?

@dreamscached
Copy link

dreamscached commented Dec 12, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants