#1 Fixed CMake configs installation
Merged 2 years ago by music. Opened 2 years ago by xvitaly.
Unknown source fix-install  into  rawhide

@@ -0,0 +1,49 @@

+ From 6b23616917eab2e5b8f52c3e73d70d36ff7d9127 Mon Sep 17 00:00:00 2001

+ From: Vitaly Zaitsev <vitaly@easycoding.org>

+ Date: Tue, 1 Mar 2022 17:08:03 +0100

+ Subject: [PATCH] Fixed installation on other than Ubuntu GNU/Linux

+  distributions.

+ 

+ Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>

+ ---

+  CMakeLists.txt | 17 +++++++++--------

+  1 file changed, 9 insertions(+), 8 deletions(-)

+ 

+ diff --git a/CMakeLists.txt b/CMakeLists.txt

+ index d2c40bc..6c8f502 100644

+ --- a/CMakeLists.txt

+ +++ b/CMakeLists.txt

+ @@ -42,24 +42,25 @@ if(MSVC_VERSION GREATER 1910)

+  endif()

+  

+  

+ +include(GNUInstallDirs)

+  include(CMakePackageConfigHelpers)

+  

+  set(FASTFLOAT_VERSION_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/module/FastFloatConfigVersion.cmake")

+  set(FASTFLOAT_PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/module/FastFloatConfig.cmake")

+ -set(FASTFLOAT_INSTALL_DIR "share/FastFloat")

+ +set(FASTFLOAT_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/cmake/FastFloat")

+  

+  write_basic_package_version_file("${FASTFLOAT_VERSION_CONFIG}" VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion)

+  configure_package_config_file("cmake/config.cmake.in"

+                                "${FASTFLOAT_PROJECT_CONFIG}"

+ -                              INSTALL_DESTINATION "${FASTFLOAT_INSTALL_DIR}")

+ +                              INSTALL_DESTINATION "${FASTFLOAT_CONFIG_INSTALL_DIR}")

+  

+ -install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/fast_float" DESTINATION "include")

+ -install(FILES "${FASTFLOAT_PROJECT_CONFIG}" "${FASTFLOAT_VERSION_CONFIG}" DESTINATION "${FASTFLOAT_INSTALL_DIR}")

+ -install(EXPORT ${PROJECT_NAME}-targets NAMESPACE FastFloat:: DESTINATION "${FASTFLOAT_INSTALL_DIR}")

+ +install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/fast_float" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

+ +install(FILES "${FASTFLOAT_PROJECT_CONFIG}" "${FASTFLOAT_VERSION_CONFIG}" DESTINATION "${FASTFLOAT_CONFIG_INSTALL_DIR}")

+ +install(EXPORT ${PROJECT_NAME}-targets NAMESPACE FastFloat:: DESTINATION "${FASTFLOAT_CONFIG_INSTALL_DIR}")

+  

+  install(TARGETS fast_float 

+          EXPORT ${PROJECT_NAME}-targets

+ -        RUNTIME DESTINATION bin

+ -        ARCHIVE DESTINATION lib

+ -        LIBRARY DESTINATION lib

+ +        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}

+ +        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}

+ +        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

+  )

file modified
+4 -1
@@ -29,6 +29,9 @@

  Source0:        %{forgesource}

  Source1:        %{stf_forgeurl}/archive/%{stf_commit}/supplemental_test_files-%{stf_commit}.tar.gz

  

+ # https://github.com/fastfloat/fast_float/pull/127

+ Patch100:       %{name}-fixed-cmake-installation.patch

+ 

  BuildRequires:  gcc-c++

  BuildRequires:  cmake

  # Our choice; the default make backend should work just as well
@@ -106,7 +109,7 @@

  

  %{_includedir}/fast_float

  

- %{_datadir}/FastFloat

+ %{_datadir}/cmake/FastFloat

  

  

  %changelog

Fixed CMake configs installation.

Fixes RHBZ#2059643.

Thanks. This looks reasonable.

Daniel Lemire is very responsive, so I’ll allow a day or two for feedback on the upstream PR. Assuming there are no unresolved questions from that, I’ll plan to merge and backport as far as reasonable—at least to F35+ and EPEL9, and to F34/EPEL8 if I can reasonably apply the patch to 1.1.2.

Sorry, but I'm not touching EPEL.

I didn’t ask you to…? I said I would backport this PR once merged.

rebased onto 4996972

2 years ago

Upstream merged my PR.

Thanks. I’ll go ahead and merge/build for Rawhide, and follow up in the other releases in the next day or two. The build runs the exhaustive tests, so it will take a number of hours to finish.

Pull-Request has been merged by music

2 years ago