Set IMPORT_PREFIX to "lib" on Windows

Fix the follwing Ninja warning:
ninja: warning: multiple rules generate yuv.lib. builds involving this
target will not be correct; continuing anyway [-w dupbuild=warn]

Without this change, both the static library and the DLL's import
library are named "yuv.lib". With this change, the DLL's import library
is named "libyuv.lib", corresponding to the DLL name "libyuv.dll".

Bug: libyuv:939
Change-Id: I879e51b54070e5ab8cb128adb5dde765f881dbec
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3806073
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
Wan-Teh Chang 2022-08-02 17:16:04 -07:00 committed by libyuv LUCI CQ
parent e65dacada5
commit ffa8efbb11

View File

@ -29,6 +29,9 @@ ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} )
ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} )
SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" )
SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES PREFIX "lib" )
if(WIN32)
SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" )
endif()
# this creates the conversion tool
ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )