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
This commit is contained in:
parent
e87751d69a
commit
b2497a8d15
@ -62,8 +62,11 @@ add_custom_command(OUTPUT libcurl-symbols.md
|
|||||||
add_manual_pages(man_MANS)
|
add_manual_pages(man_MANS)
|
||||||
add_custom_target(man ALL DEPENDS ${man_MANS})
|
add_custom_target(man ALL DEPENDS ${man_MANS})
|
||||||
if(NOT CURL_DISABLE_INSTALL)
|
if(NOT CURL_DISABLE_INSTALL)
|
||||||
install(FILES "$<LIST:TRANSFORM,${man_MANS},PREPEND,${CMAKE_CURRENT_BINARY_DIR}/>"
|
unset(_src)
|
||||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
|
foreach(_f ${man_MANS})
|
||||||
|
list(APPEND _src "${CMAKE_CURRENT_BINARY_DIR}/${_f}")
|
||||||
|
endforeach()
|
||||||
|
install(FILES ${_src} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(opts)
|
add_subdirectory(opts)
|
||||||
|
|||||||
@ -29,6 +29,9 @@ add_manual_pages(man_MANS)
|
|||||||
add_custom_target(opts-man DEPENDS ${man_MANS})
|
add_custom_target(opts-man DEPENDS ${man_MANS})
|
||||||
add_dependencies(man opts-man)
|
add_dependencies(man opts-man)
|
||||||
if(NOT CURL_DISABLE_INSTALL)
|
if(NOT CURL_DISABLE_INSTALL)
|
||||||
install(FILES "$<LIST:TRANSFORM,${man_MANS},PREPEND,${CMAKE_CURRENT_BINARY_DIR}/>"
|
unset(_src)
|
||||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
|
foreach(_f ${man_MANS})
|
||||||
|
list(APPEND _src "${CMAKE_CURRENT_BINARY_DIR}/${_f}")
|
||||||
|
endforeach()
|
||||||
|
install(FILES ${_src} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user