Install yuvconvert with install(TARGETS)

The original code
  INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert ...)
fails on Windows because it is missing the .exe file extension. Change
it to install( TARGETS yuvconvert ...) based on CMake documentation:
  [The PROGRAMS form] is intended to install programs that are not
  targets, such as shell scripts. Use the TARGETS form to install
  targets built within the project.

Note that this change was first made in the cmake-mingw.patch file in
the mingw-w64-libyuv package:
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-libyuv

Change-Id: Ia571aa61e136cef477f05e051fef2cfb1db4b77d
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5840469
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
Wan-Teh Chang 2024-09-05 13:45:18 -07:00 committed by Frank Barchard
parent 552d775b43
commit 41d0cd3360

View File

@ -211,7 +211,7 @@ endif()
# install the conversion tool, .so, .a, and all the header files
install ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin )
install ( TARGETS yuvconvert DESTINATION bin )
install ( TARGETS ${ly_lib_static} DESTINATION lib )
install ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib )
install ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include )