aws-c-s3/acs_fix-cmake-modules-path.patch
John Paul Adrian Glaubitz f248df4732 Accepting request 1185385 from home:glaubitz:branches:devel:libraries:c_c++
- Update to version 0.6.0
  * Auto - Update S3 Ruleset & Partition by @waahm7 in (#436)
  * clang-format 18 by @graebm in (#438)
  * BREAKING CHANGE: operation_name must be set for DEFAULT
    meta-requests by @graebm in (#439)
  * Fix shutdown_callback or returning NULL contract for
    meta_request by @waahm7 in (#440)
  * test_helper.py improvements by @graebm in (#442)

OBS-URL: https://build.opensuse.org/request/show/1185385
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/aws-c-s3?expand=0&rev=52
2024-07-09 10:01:50 +00:00

45 lines
1.6 KiB
Diff

diff -Nru aws-c-s3-0.1.29.orig/CMakeLists.txt aws-c-s3-0.1.29/CMakeLists.txt
--- aws-c-s3-0.1.29.orig/CMakeLists.txt 2021-12-02 23:07:39.000000000 +0000
+++ aws-c-s3-0.1.29/CMakeLists.txt 2021-12-09 13:34:21.908897209 +0000
@@ -20,17 +20,12 @@
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)
+find_package(aws-checksums REQUIRED)
+set(CMAKE_MODULE_PATH ${aws-c-common_DIR})
-# This is required in order to append /lib/cmake to each element in CMAKE_PREFIX_PATH
-set(AWS_MODULE_DIR "/${CMAKE_INSTALL_LIBDIR}/cmake")
-string(REPLACE ";" "${AWS_MODULE_DIR};" AWS_MODULE_PATH "${CMAKE_PREFIX_PATH}${AWS_MODULE_DIR}")
-# Append that generated list to the module search path
-list(APPEND CMAKE_MODULE_PATH ${AWS_MODULE_PATH})
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
+include(GNUInstallDirs)
include(AwsCFlags)
include(AwsCheckHeaders)
@@ -109,7 +104,7 @@
endif()
install(EXPORT "${PROJECT_NAME}-targets"
- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/${CMAKE_PROJECT_NAME}/${TARGET_DIR}/"
NAMESPACE AWS::
COMPONENT Development)
@@ -118,7 +113,7 @@
@ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/${CMAKE_PROJECT_NAME}"
COMPONENT Development)
include(CTest)