Open MuellerSeb opened 4 months ago
I'd like to use toml-f as a dependency in my cmake based project and I use CPM to download and compile dependencies.
It would be cool to add a section in the documentation under the "integrate with cmake" part showing how to do this.
Should look like this:
include(cmake/CPM.cmake) CPMAddPackage("gh:toml-f/toml-f@0.4.2") target_link_libraries(${LIB_NAME} PUBLIC toml-f::toml-f)
(and 3 lines to link against toml-f is quite amazing IMHO)
If you want to download CPM on the fly, you could also add this:
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM.cmake") file(DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.1/CPM.cmake ${CPM_DOWNLOAD_LOCATION}) include(${CPM_DOWNLOAD_LOCATION})
Cheers, Sebastian
Contributions are welcome, feel free to sent a patch for adding this to the docs.
I'd like to use toml-f as a dependency in my cmake based project and I use CPM to download and compile dependencies.
It would be cool to add a section in the documentation under the "integrate with cmake" part showing how to do this.
Should look like this:
(and 3 lines to link against toml-f is quite amazing IMHO)
If you want to download CPM on the fly, you could also add this:
Cheers, Sebastian