use namespaced target (#67)

* use namespaced target

* update .cmake-format for PackageProject.cmake 1.4
This commit is contained in:
Lars Melchior 2020-12-18 19:36:44 +01:00 committed by GitHub
parent eadea97fe4
commit 8dc50e5294
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View file

@ -27,7 +27,7 @@ include(cmake/CPM.cmake)
CPMAddPackage(
NAME PackageProject.cmake
GITHUB_REPOSITORY TheLartians/PackageProject.cmake
VERSION 1.3
VERSION 1.4
)
# ---- Add source files ----
@ -67,6 +67,7 @@ string(TOLOWER ${PROJECT_NAME}/version.h VERSION_HEADER_LOCATION)
packageProject(
NAME ${PROJECT_NAME}
VERSION ${PROJECT_VERSION}
NAMESPACE ${PROJECT_NAME}
BINARY_DIR ${PROJECT_BINARY_DIR}
INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include
INCLUDE_DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION}