From 1ba0c23c5372844f57210786c38e28c96e0c3d5d Mon Sep 17 00:00:00 2001 From: Lars Melchior Date: Wed, 3 Jun 2020 16:24:21 +0200 Subject: [PATCH] add comment for version header location --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7239ead..cb7fe9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,9 @@ 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) +# the location where the project's version header will be placed +# should match the project's regular header paths +string(TOLOWER ${PROJECT_NAME}/version.h VERSION_HEADER_LOCATION) packageProject( NAME ${PROJECT_NAME} @@ -66,6 +68,6 @@ packageProject( 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" + VERSION_HEADER "${VERSION_HEADER_LOCATION}" DEPENDENCIES "" )