cmake-init-use-pkg-config
cmake-init-fetchcontent
Our great sponsors
cmake-init-use-pkg-config | cmake-init-fetchcontent | |
---|---|---|
2 | 4 | |
4 | 2 | |
- | - | |
2.6 | 1.8 | |
over 2 years ago | about 2 years 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-use-pkg-config
-
Good reasons to NOT use CMake
You have to realize that the point of using CMake is not entirely about your project, but about downstream users who wish to use CMake as well. If you do not support clients using CMake (i.e. install a CMake package) you are forcing every downstream user to figure your requirements out by themselves, which even for a project with no dependencies is non-trivial: https://github.com/friendlyanon/cmake-init-use-pkg-config
-
cmake-init - The missing CMake project initializer, now with Conan and vcpkg templates!
See this example from the wiki. This one tries to use unofficial vcpkg package nd targets, then falls back to pkg config, then falls back to find_* commands. This is probably more than what you are asking, but you can put anything in the find module, even code that vendors projects, although I highly recommend against any form of vendoring (manual, git, FetchContent, etc). Vendoring only causes problems for packagers.
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
What are some alternatives?
cmake-init - The missing CMake project initializer
SimpleBLE - SimpleBLE - the all-in-one Bluetooth library for MacOS, iOS, Windows, and Linux.
meson-brainfuck - A proof that Meson is actually Turing-Complete
SimpleBluez - A simple C++ wrapper around Bluez with a commercially-friendly licence.
cmake_format - Source code formatter for cmake listfiles.
cmake-init-vcpkg-example - cmake-init generated executable project with vcpkg integration
ProxImaL - A domain-specific language for image optimization.
brainflow - BrainFlow is a library intended to obtain, parse and analyze EEG, EMG, ECG and other kinds of data from biosensors
cppfront - CMake wrapper around the cppfront repository
SimpleDBus - A simple C++ wrapper around DBus with a commercial-friendly licence.