From ffa8efbb11e0876371bd71be41284cf60750f131 Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Tue, 2 Aug 2022 17:16:04 -0700 Subject: [PATCH] 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 Reviewed-by: Frank Barchard Commit-Queue: Frank Barchard --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 636531eee..3a210c077 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 )