From 41d0cd3360af6f8a4a460a0d0d67fde85bfacc09 Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Thu, 5 Sep 2024 13:45:18 -0700 Subject: [PATCH] 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 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5223d4c35..1381fc070 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 )