This project is a simple CMake Library Project Template.
It initializes the directory structure, version.h.in, CMake-Package-Configuration files as well as the CMakeLists.txt
.
Rudimentary installation steps are included in the CMakeLists.txt
- library (shared)
- header (public header)
- package configuration (
CMakePackageConfigHelpers
)
- src/
- include/
- cmake/
- <PROJECT_NAME>Config.cmake.in
- version.h.in
- CMakeLists.txt
- .gitignore
- setup.sh
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN YES
sed
Note: On OSX it's required to have gsed installed to make the script work properly.
brew install gnu-sed
Usage:
chmod +x ./setup.sh
./setup.sh <Project Name> <library/target name>
Remove git-directories afterwards.
rm -rf .git