CPM.cmake
CPM.cmake copied to clipboard
📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.
Repository : https://github.com/libuv/libuv I tried with the following configuration : ``` CPMAddPackage( NAME libuv GITHUB_REPOSITORY libuv/libuv VERSION 1.48.0 ) ``` and linked it with my target, but it seems the...
This allows to combine the shorthand syntax with additional arguments: ``` CPMAddPackage("gh:nlohmann/[email protected]" OPTIONS "JSON_BUildTests OFF") ``` This is much shorter than the longer syntax way of writing: ``` CPMAddPackage( NAME...
The short syntax is very useful, however sometimes I would like to set options. An example: ``` CPMAddPackage( GITHUB_REPOSITORY gabime/spdlog VERSION 1.13.0 EXCLUDE_FROM_ALL YES SYSTEM YES OPTIONS "SPDLOG_FMT_EXTERNAL ON" )...
Sometimes, automated builds on our build server fails due to the fact, that cpm failed to clone a dependency. The resulting folder is just empty and cpm warns that the...
This is related to cached packages. No cache or direct CMake FetchContent is probably not affected, as download is tried every time. The cache download directory is created before the...
I am using CPMAddPackage to download a repo at a tag containing a lot less than the main branch. I have specified GIT_SHALLOW, however, this downloads the whole repo before...
fetchContent can be used in CMake scripts (cmake -P) However, cpm.cmake manipulates some properties so this is not possible as a script. Any way this can be fixed? (I tried...
If I use `add_executable()` it automatically "knows" where to find every h-file. However, `add_library()` with the same source files (except for main.cpp) requires adding `target_include_directories()` with the locations of all...
Add a marker .download file to validate the contents in cache directories. Previously only the existence of the directory was used, so if the download was aborted the cache directory...
`NAME # The unique name of the dependency (should be the exported target's name)` There are two problems: - Package can export several targets (i.e. `lib` and `lib_static`). - `find_package()`...