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 "" )