diff -Nru aws-crt-cpp-0.18.13.orig/CMakeLists.txt aws-crt-cpp-0.18.13/CMakeLists.txt --- aws-crt-cpp-0.18.13.orig/CMakeLists.txt 2022-11-09 04:52:33.000000000 +0000 +++ aws-crt-cpp-0.18.13/CMakeLists.txt 2022-11-11 12:51:50.150393984 +0000 @@ -60,11 +60,8 @@ file(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX) endif() -if(UNIX AND NOT APPLE) - include(GNUInstallDirs) -elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) - set(CMAKE_INSTALL_LIBDIR "lib") -endif() +find_package(aws-c-common REQUIRED) +set(CMAKE_MODULE_PATH ${aws-c-common_DIR}) if(${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64") set(FIND_LIBRARY_USE_LIB64_PATHS true) @@ -360,7 +357,7 @@ endif() install(EXPORT "${PROJECT_NAME}-targets" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/${TARGET_DIR}" + DESTINATION "${LIB_INSTALL_DIR}/cmake/${CMAKE_PROJECT_NAME}/${TARGET_DIR}/" NAMESPACE AWS:: COMPONENT Development) @@ -376,11 +373,11 @@ ) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/" + DESTINATION "${LIB_INSTALL_DIR}/cmake/${CMAKE_PROJECT_NAME}" COMPONENT Development) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/" + DESTINATION "${LIB_INSTALL_DIR}/cmake/${CMAKE_PROJECT_NAME}" COMPONENT Development) if(NOT CMAKE_CROSSCOMPILING)