cmake-init-fetchcontent
cmake-init-vcpkg-example
cmake-init-fetchcontent | cmake-init-vcpkg-example | |
---|---|---|
4 | 19 | |
2 | 8 | |
- | - | |
1.8 | 4.7 | |
about 2 years ago | 19 days ago | |
CMake | CMake | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cmake-init-fetchcontent
-
CMake 3.24 has support for dependency providers
You can see that in action here: https://github.com/friendlyanon/cmake-init-fetchcontent This example has the idiomatic find_package(headeronly REQUIRED) call in the CMakeLists.txt, but when configuring ${sourceDir}/cmake/find is added to CMAKE_MODULE_PATH, so the FetchContent code is run to "find" the dependency. There are comments to further explain this.
-
SimpleBLE - Cross-platform BLE library for Windows, Linux and MacOS/iOS
Please consider using https://github.com/friendlyanon/cmake-init before this has any significant amount of users. There is an example that shows you how to still rely on FetchContent as an opt-in.
-
How would you create/maintain a new c++ project using modern tools/practices?
Are they only on git(hub)? You can write a vcpkg overlay port (example) or use FetchContent if the projects are FetchContent ready in a way that doesn't force FetchContent on people trying to build the project (example).
-
cmake-init - The missing CMake project initializer, now with Conan and vcpkg templates!
This came up somewhere else, but I created an example repo that idiomatically uses find_package and an opt-in find module to FetchContent a dependency from GitHub: https://github.com/friendlyanon/cmake-init-fetchcontent
cmake-init-vcpkg-example
-
Clang-tidy ignore third party
If your dep is not on any of those, then you can write your own port with vcpkg very easily like this.
-
How would you create/maintain a new c++ project using modern tools/practices?
Are they only on git(hub)? You can write a vcpkg overlay port (example) or use FetchContent if the projects are FetchContent ready in a way that doesn't force FetchContent on people trying to build the project (example).
-
CMake/Make problem when compiling C++
Take a look at cmake-init, vcpkg and this example that shows how to pull dependencies from git(hub) using vcpkg's overlay ports.
-
How to download libraries with vcpkg?
cs50 doesn't appear to be present in the MS repo. No problem, you can write your own overlay port. You can find an example for that here: https://github.com/friendlyanon/cmake-init-vcpkg-example
-
Managing Newlib as a Project Dependency
You can take a look at vcpkg or Conan. Maybe vcpkg could be simpler here, because overlay ports are simpler to write than setting up Artifactory for Conan.
-
Best way to manage dependencies with c++?
Conan and vcpkg are the only options. I use them both, depends on what kinds of dependencies I want to pull. vcpkg is easier to setup custom one-off dependencies with using overlay ports, while Conan is faster at things if your profile fits one that has a pre-built binary in CCI. Both are trivial to integrate with a CMake project, see these examples for Conan and vcpkg.
-
Libraries
Here is an example that shows you how to write your own ports for libraries that don't have one provided by vcpkg. The alternative is doing it manually, but eh.
-
CMakePresets.json and vcpkg based GitHub Action workflows for C++
As part of the cmake-init examples I also have an example showing vcpkg integration with a CMake project with exact instructions on what that takes, which also involves CI.
-
Barbarian, an open and distributed Conan package index!
Overlay ports.
-
Problem with imported library
IMPORTED targets have directory scope, they aren't global like the other target types. Depending on what your project's type is and how it's used, the correct answer can vary from just requiring a path to be passed on the CLI to proper package management usage (e.g. vcpkg)
What are some alternatives?
SimpleBLE - SimpleBLE - the all-in-one Bluetooth library for MacOS, iOS, Windows, and Linux.
CPM.cmake - 📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.
SimpleBluez - A simple C++ wrapper around Bluez with a commercially-friendly licence.
steam-runtime - A runtime environment for Steam applications
cmake-init-use-pkg-config - Using a dependency that does not support clients using CMake
conan-center-index - Recipes for the ConanCenter repository
brainflow - BrainFlow is a library intended to obtain, parse and analyze EEG, EMG, ECG and other kinds of data from biosensors
Folly - An open-source C++ library developed and used at Facebook.
SimpleDBus - A simple C++ wrapper around DBus with a commercial-friendly licence.
CMake - Mirror of CMake upstream repository
cmake_format - Source code formatter for cmake listfiles.
Jenkins - Jenkins automation server