]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: fix install for older CMake versions
authorRichard Levitte <richard@levitte.org>
Sat, 10 Feb 2024 16:34:43 +0000 (17:34 +0100)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 18 Feb 2024 06:02:45 +0000 (01:02 -0500)
- Generate the docs install list by using a foreach loop instead of
  LIST:TRANSFORM since older CMake can't handle the latter.

Reported-by: Dan Fandrich
Fixes https://github.com/curl/curl/issues/12920
Closes https://github.com/curl/curl/pull/12922

docs/libcurl/CMakeLists.txt
docs/libcurl/opts/CMakeLists.txt

index 6f0aa6490224d6f4c20e72fea1955ccc4e4f6e5a..0bc35fc97321a4e23504462b9a1504167899c157 100644 (file)
@@ -62,8 +62,11 @@ add_custom_command(OUTPUT libcurl-symbols.md
 add_manual_pages(man_MANS)
 add_custom_target(man ALL DEPENDS ${man_MANS})
 if(NOT CURL_DISABLE_INSTALL)
-  install(FILES "$<LIST:TRANSFORM,${man_MANS},PREPEND,${CMAKE_CURRENT_BINARY_DIR}/>"
-          DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
+  unset(_src)
+  foreach(_f ${man_MANS})
+    list(APPEND _src "${CMAKE_CURRENT_BINARY_DIR}/${_f}")
+  endforeach()
+  install(FILES ${_src} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
 endif()
 
 add_subdirectory(opts)
index 82844a2251ae8b0ef6ed29fe832481c35bf0e7d6..a20d0b9bf9ee9e0dc0e4820a0a20685f63aaf40a 100644 (file)
@@ -29,6 +29,9 @@ add_manual_pages(man_MANS)
 add_custom_target(opts-man DEPENDS ${man_MANS})
 add_dependencies(man opts-man)
 if(NOT CURL_DISABLE_INSTALL)
-  install(FILES "$<LIST:TRANSFORM,${man_MANS},PREPEND,${CMAKE_CURRENT_BINARY_DIR}/>"
-          DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
+  unset(_src)
+  foreach(_f ${man_MANS})
+    list(APPEND _src "${CMAKE_CURRENT_BINARY_DIR}/${_f}")
+  endforeach()
+  install(FILES ${_src} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
 endif()