brainboxdotcc / DPP

C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots!
https://dpp.dev/
Apache License 2.0
1.06k stars 161 forks source link

CMake FetchContent support? #1167

Closed Advik-B closed 3 months ago

Advik-B commented 3 months ago

So that I can use FetchContent to avoid pkg managers.

Like use FetchContent and the library will automatically be setup

Jaskowicz1 commented 3 months ago

You don't add support for FetchContent, it pulls from git. You're still in charge of making sure you have the dependencies that D++ requires. A quick google search would tell you that, see link.

If you want to use D++ via FetchContent, do something like

include(FetchContent)

FetchContent_Declare(dpp
  GIT_REPOSITORY https://github.com/brainboxdotcc/DPP.git
  GIT_TAG v10.0.30
)

FetchContent_MakeAvailable(dpp)

You can then link to dpp like you would normally.

Mishura4 commented 3 months ago

Jaskowicz it is very insensitive of you to say words such as "you" and "it", they don't believe in pronouns!, you're going to make them cry!

...Oh shoot I used pronouns too

Oh no I did it again

Help

Advik-B commented 3 months ago

Jaskowicz it is very insensitive of you to say words such as "you" and "it", they don't believe in pronouns!, you're going to make them cry!

...Oh shoot I used pronouns too

Oh no I did it again

Help

Huh

Advik-B commented 3 months ago

You don't add support for FetchContent, it pulls from git. You're still in charge of making sure you have the dependencies that D++ requires. A quick google search would tell you that, see link.

If you want to use D++ via FetchContent, do something like

include(FetchContent)

FetchContent_Declare(dpp
  GIT_REPOSITORY https://github.com/brainboxdotcc/DPP.git
  GIT_TAG v10.0.30
)

FetchContent_MakeAvailable(dpp)

You can then link to dpp like you would normally.

Ye but I want to statically link to dpp Does setting BUILD_SHARED_LIBS to OFF In CMake help?

Jaskowicz1 commented 3 months ago

Ye but I want to statically link to dpp Does setting BUILD_SHARED_LIBS to OFF In CMake help?

We don't support statically linking.

Mishura4 commented 3 months ago

We do on Linux, and yes that will do it