https://github.com/lecrisut/cmakeextrautils
Helpful CMake modules for project management and export
https://github.com/lecrisut/cmakeextrautils
cmake
Last synced: 6 months ago
JSON representation
Helpful CMake modules for project management and export
- Host: GitHub
- URL: https://github.com/lecrisut/cmakeextrautils
- Owner: LecrisUT
- License: gpl-3.0
- Created: 2023-03-16T09:26:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-24T12:33:43.000Z (almost 2 years ago)
- Last Synced: 2025-02-01T20:14:49.815Z (over 1 year ago)
- Topics: cmake
- Language: CMake
- Homepage:
- Size: 177 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CMakeExtraUtils
Extra utilities for cmake:
- [`DynamicVersion`](cmake/DynamicVersion.md)
- [`PackageComps`](cmake/PackageComps.md)
## Installation
These utilities can be included using both `find_package()` and `ExternalProject`, e.g. if `CMakeExtraUtils` is already
installed on your system:
```cmake
cmake_minimum_required(VERSION 3.20)
find_package(CMakeExtraUtils REQUIRED)
include(DynamicVersion)
dynamic_version()
project(MyProject
VERSION ${PROJECT_VERSION})
```
or if you want to download a specific version:
```cmake
cmake_minimum_required(VERSION 3.20)
FetchContet_Declare(CMakeExtraUtils
GIT_REPOSITORY https://github.com/LecriUT/CMakeExtraUtils
GIT_TAG v0.1.1)
FetchContent_MakeAvailable(CMakeExtraUtils)
include(DynamicVersion)
dynamic_version()
project(MyProject
VERSION ${PROJECT_VERSION})
```
## TODO for v1.0
- [x] Automation:
- [x] Add simple pre-commit and `pyproject.toml` environment
- [x] Fix `DynamicVersion` to work with buildable projects
- [ ] Test coverage:
- [x] `DynamicVersion`
- [ ] `PackageComps`