From: Richard Levitte Date: Sat, 10 Feb 2024 16:34:43 +0000 (+0100) Subject: cmake: fix install for older CMake versions X-Git-Tag: curl-8_7_0~175 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2497a8d15284dfef4fa7f032572e07b0b4b4720;p=thirdparty%2Fcurl.git cmake: fix install for older CMake versions - 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 --- diff --git a/docs/libcurl/CMakeLists.txt b/docs/libcurl/CMakeLists.txt index 6f0aa64902..0bc35fc973 100644 --- a/docs/libcurl/CMakeLists.txt +++ b/docs/libcurl/CMakeLists.txt @@ -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 "$" - 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) diff --git a/docs/libcurl/opts/CMakeLists.txt b/docs/libcurl/opts/CMakeLists.txt index 82844a2251..a20d0b9bf9 100644 --- a/docs/libcurl/opts/CMakeLists.txt +++ b/docs/libcurl/opts/CMakeLists.txt @@ -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 "$" - 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()