1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-09-05 16:31:01 +02:00

move includes into project directory and create version header

This commit is contained in:
Lars Melchior 2020-06-03 16:15:11 +02:00
parent 47f89bf102
commit 81fdc61cb1
6 changed files with 17 additions and 5 deletions

View file

@ -23,7 +23,7 @@ include(cmake/CPM.cmake)
CPMAddPackage(
NAME PackageProject.cmake
GITHUB_REPOSITORY TheLartians/PackageProject.cmake
VERSION 1.2.1
VERSION 1.3
)
# ---- Add source files ----
@ -58,11 +58,14 @@ target_include_directories(Greeter
# ---- Create an installable target ----
# this allows users to install and find the library via `find_package()`.
string(TOLOWER ${PROJECT_NAME} LOWERCASE_PROJECT_NAME)
packageProject(
NAME ${PROJECT_NAME}
VERSION ${PROJECT_VERSION}
BINARY_DIR ${PROJECT_BINARY_DIR}
INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include
INCLUDE_DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION}
VERSION_HEADER "${LOWERCASE_PROJECT_NAME}/version.h"
DEPENDENCIES ""
)