From e53571de0bb3a8350dd8c32e0464ee2387997ba8 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 29 Dec 2020 02:49:19 -0800 Subject: [PATCH] Fix case-sensitivity issues with CMake package --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab61c7f..45f44e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,8 +130,10 @@ endif() #--- Package include(CMakePackageConfigHelpers) +string(TOLOWER ${PROJECT_NAME} PACKAGE_NAME) + write_basic_package_version_file( - ${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config-version.cmake + ${PROJECT_BINARY_DIR}/cmake/${PACKAGE_NAME}-config-version.cmake VERSION ${DIRECTXTEX_VERSION} COMPATIBILITY AnyNewerVersion) @@ -142,7 +144,7 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/.nuget/${PROJECT_NAME}-config.cmake.in - ${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.cmake + ${PROJECT_BINARY_DIR}/cmake/${PACKAGE_NAME}-config.cmake INSTALL_DESTINATION cmake/}) install(EXPORT ${PROJECT_NAME}-targets @@ -155,8 +157,8 @@ install(FILES ${LIBRARY_HEADERS} install( FILES - ${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.cmake - ${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config-version.cmake + ${PROJECT_BINARY_DIR}/cmake/${PACKAGE_NAME}-config.cmake + ${PROJECT_BINARY_DIR}/cmake/${PACKAGE_NAME}-config-version.cmake DESTINATION cmake/) #--- Command-line tools