Support using as CMake dependency
Another project that recently implemented this in a PR can be seen here: https://github.com/tplgy/cppcodec/pull/76.
Basically, allows massively simplified project configuration. The end goal for me is that I can do something like the following in my CMakeLists.txt:
# fetch dbcppp
FetchContent_Declare(
libdbcppp
GIT_REPOSITORY https://github.com/xR3b0rn/dbcppp
GIT_TAG 54ce78ad53442db94e03d16a4fd5f3b339dab193
)
FetchContent_MakeAvailable(libdbcppp)
Another project that supports this is argparse (https://github.com/p-ranav/argparse#cmake-integration).
This did not work when I tested this with your project, I tried to get it working but ran out of time and the CMake files are quite complex. Please let me know what you think about this
The above code snippet works fine in CMake, but I can not import or access the library in my code
I also think this could be somehow related to #96 . After seeing that, I figured it would work but unfortunately not
Been trying to get Conan working with this library: https://github.com/conan-io/conan-center-index/pull/13826 I do have a patch file that allows it to work with the Conan packaging system, but get access violations when building as a dll. I can see about porting over some of the functionality.
it would be great if you managed to get the above CMake code snippet I provided above working. Would be very thankful!
Do you have a public project I could test with?
Do you have a public project I could test with?
@Nomalah I know this is a lot late, but here: https://github.com/CorvetteCole/dbcppp-cmake
It seems to pull it in as I'd expect, but can't find the actual import when compiling. Can not figure it out. If you comment out the dbcppp import in main.cpp it will compile properly. Would really appreciate it if you figured that out!!
I also included argparse as an example imported in the same way (except it works)