File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # PackageProject.cmake
2+
3+ A small helper script to simplify the CMake packaging process.
4+
5+ ## Usage
6+
7+ To create an installable target for your current project, add the following to your CMakeLists.txt.
8+ This example assumes the project to be versioned and the name to be identical to the library to export.
9+ Also the [ CPM.cmake] ( https://github.com/TheLartians/CPM.cmake ) should be included.
10+
11+ ``` cmake
12+ CPMAddPackage(
13+ NAME PackageProject.cmake
14+ GITHUB_REPOSITORY TheLartians/PackageProject.cmake
15+ VERSION 1.0
16+ )
17+
18+ packageProject(
19+ NAME ${PROJECT_NAME}
20+ VERSION ${PROJECT_VERSION}
21+ BINARY_DIR ${PROJECT_BINARY_DIR}
22+ INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include
23+ INCLUDE_DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION}
24+ )
25+ ```
26+
27+ If you need extra functionality feel free to open an issue or a PR.
28+
You can’t perform that action at this time.
0 commit comments