Closed rafaeldelboni closed 3 years ago
Hi,
I'm not familiar with FetchContent unfortunately, I'll take a look though.
To make source distribution easier, folders are independent. If you want to use sc_str, you just copy sc_str.h sc_str.c to your project. At least, this is how I use these libraries in my projects, I just copy pieces I want. Doesn't this work for you?
I use CMake just for testing, it doesn't build .a or .so file.
Edit : Just to clarify, library distribution is drag & drop source and header files. If you want map, copy sc_map.h scmap.c to your project. I did this deliberately not to deal with library build process. I think what FetchContent trying to do is, pull code & build & link to your project, this is why it doesn't work, I don't build library for sc* files in Cmake files.
Hi @tezc, thanks for your input,
I was able to make it work in my fork I did a PR to you check how I made, feel free to ignore or close it.
I know is super simple just copy and paste the libs in my project, but feels a little bit more modern to add as a downloadable dependency, in this way I can do better version control and even ignore lib files from my project git.
If you interested about cmake FetchContent I made a little boilerplate where I download a test library using it.
Anyways is just a suggestion thanks for your attention and libraries it will help me a lot :)
Best Regards
Hi @rafaeldelboni
Thanks a lot for the PR. I really appreciate it. I'll merge another PR for a few things and create a release tag, if FetchContent is being used for version control, that will help people who use FetchContent I believe.
Let me know if you have any issues while using libs :) Cheers.
@rafaeldelboni
I've created v1.0.0 tag. I will keep api stable for major versions.
Thanks a lot! :)
I'm trying to use your libs over cmake's FetchContent like so:
Then when I try to link the
sc_str
in my buildI get this error: