From 85979a79983573c908958cd27197290cd19ea7b6 Mon Sep 17 00:00:00 2001 From: Yannis Guyon Date: Mon, 2 Sep 2024 13:31:41 +0000 Subject: [PATCH] Add IMPORTED_IMPLIB property to each CMake Module (#2425) --- cmake/Modules/Findaom.cmake | 2 +- cmake/Modules/Finddav1d.cmake | 2 +- cmake/Modules/Findlibgav1.cmake | 5 ++++- cmake/Modules/Findlibsharpyuv.cmake | 5 ++++- cmake/Modules/Findlibyuv.cmake | 4 +++- cmake/Modules/Findrav1e.cmake | 4 +++- cmake/Modules/Findsvt.cmake | 2 +- 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/cmake/Modules/Findaom.cmake b/cmake/Modules/Findaom.cmake index 6af8c65765..95df9d7d86 100644 --- a/cmake/Modules/Findaom.cmake +++ b/cmake/Modules/Findaom.cmake @@ -51,6 +51,6 @@ if(AOM_LIBRARY) else() add_library(aom SHARED IMPORTED GLOBAL) endif() - set_target_properties(aom PROPERTIES IMPORTED_LOCATION "${AOM_LIBRARY}") + set_target_properties(aom PROPERTIES IMPORTED_LOCATION "${AOM_LIBRARY}" IMPORTED_IMPLIB "${AOM_LIBRARY}") target_include_directories(aom INTERFACE ${AOM_INCLUDE_DIR}) endif() diff --git a/cmake/Modules/Finddav1d.cmake b/cmake/Modules/Finddav1d.cmake index 91d7b8c7bf..7040a9cfe5 100644 --- a/cmake/Modules/Finddav1d.cmake +++ b/cmake/Modules/Finddav1d.cmake @@ -44,7 +44,7 @@ if(DAV1D_LIBRARY) add_library(dav1d::dav1d SHARED IMPORTED GLOBAL) endif() set_target_properties( - dav1d::dav1d PROPERTIES IMPORTED_LOCATION "${DAV1D_LIBRARY}" IMPORTED_SONAME dav1d IMPORTED_IMPLIB "${DAV1D_LIBRARY}" + dav1d::dav1d PROPERTIES IMPORTED_LOCATION "${DAV1D_LIBRARY}" IMPORTED_IMPLIB "${DAV1D_LIBRARY}" IMPORTED_SONAME dav1d ) target_include_directories(dav1d::dav1d INTERFACE ${DAV1D_INCLUDE_DIR}) endif() diff --git a/cmake/Modules/Findlibgav1.cmake b/cmake/Modules/Findlibgav1.cmake index 28a193df66..65d49984f5 100644 --- a/cmake/Modules/Findlibgav1.cmake +++ b/cmake/Modules/Findlibgav1.cmake @@ -41,6 +41,9 @@ mark_as_advanced(LIBGAV1_INCLUDE_DIR LIBGAV1_LIBRARY LIBGAV1_LIBRARIES) if(LIBGAV1_LIBRARY) add_library(libgav1::libgav1 STATIC IMPORTED GLOBAL) - set_target_properties(libgav1::libgav1 PROPERTIES IMPORTED_LOCATION "${LIBGAV1_LIBRARY}" IMPORTED_SONAME gav1) + set_target_properties( + libgav1::libgav1 PROPERTIES IMPORTED_LOCATION "${LIBGAV1_LIBRARY}" IMPORTED_IMPLIB "${LIBGAV1_LIBRARY}" IMPORTED_SONAME + gav1 + ) target_include_directories(libgav1::libgav1 INTERFACE ${LIBGAV1_INCLUDE_DIR}) endif() diff --git a/cmake/Modules/Findlibsharpyuv.cmake b/cmake/Modules/Findlibsharpyuv.cmake index f1e1fec4d7..fe70f36526 100644 --- a/cmake/Modules/Findlibsharpyuv.cmake +++ b/cmake/Modules/Findlibsharpyuv.cmake @@ -45,6 +45,9 @@ if(LIBSHARPYUV_LIBRARY) else() add_library(sharpyuv::sharpyuv SHARED IMPORTED GLOBAL) endif() - set_target_properties(sharpyuv::sharpyuv PROPERTIES IMPORTED_LOCATION "${LIBSHARPYUV_LIBRARY}" IMPORTED_SONAME sharpyuv) + set_target_properties( + sharpyuv::sharpyuv PROPERTIES IMPORTED_LOCATION "${LIBSHARPYUV_LIBRARY}" IMPORTED_IMPLIB "${LIBSHARPYUV_LIBRARY}" + IMPORTED_SONAME sharpyuv + ) target_include_directories(sharpyuv::sharpyuv INTERFACE "${LIBSHARPYUV_INCLUDE_DIR}") endif() diff --git a/cmake/Modules/Findlibyuv.cmake b/cmake/Modules/Findlibyuv.cmake index 3fb912f0e8..30e2e01bad 100644 --- a/cmake/Modules/Findlibyuv.cmake +++ b/cmake/Modules/Findlibyuv.cmake @@ -63,7 +63,9 @@ if(LIBYUV_LIBRARY) else() add_library(yuv::yuv SHARED IMPORTED GLOBAL) endif() - set_target_properties(yuv::yuv PROPERTIES IMPORTED_LOCATION "${LIBYUV_LIBRARY}" IMPORTED_SONAME yuv) + set_target_properties( + yuv::yuv PROPERTIES IMPORTED_LOCATION "${LIBYUV_LIBRARY}" IMPORTED_IMPLIB "${LIBYUV_LIBRARY}" IMPORTED_SONAME yuv + ) target_include_directories(yuv::yuv INTERFACE "${LIBYUV_INCLUDE_DIR}") set(libyuv_FOUND ON) endif() diff --git a/cmake/Modules/Findrav1e.cmake b/cmake/Modules/Findrav1e.cmake index 5c36816cf0..f844624a14 100644 --- a/cmake/Modules/Findrav1e.cmake +++ b/cmake/Modules/Findrav1e.cmake @@ -57,7 +57,9 @@ if(RAV1E_LIBRARY) else() add_library(rav1e::rav1e SHARED IMPORTED GLOBAL) endif() - set_target_properties(rav1e::rav1e PROPERTIES IMPORTED_LOCATION "${RAV1E_LIBRARY}" IMPORTED_SONAME rav1e) + set_target_properties( + rav1e::rav1e PROPERTIES IMPORTED_LOCATION "${RAV1E_LIBRARY}" IMPORTED_IMPLIB "${RAV1E_LIBRARY}" IMPORTED_SONAME rav1e + ) target_include_directories(rav1e::rav1e INTERFACE ${RAV1E_INCLUDE_DIR}) # The following is copied from the main CMakeLists.txt. if(WIN32) diff --git a/cmake/Modules/Findsvt.cmake b/cmake/Modules/Findsvt.cmake index 4acd21829a..15484eb93a 100644 --- a/cmake/Modules/Findsvt.cmake +++ b/cmake/Modules/Findsvt.cmake @@ -43,6 +43,6 @@ if(SVT_LIBRARY) else() add_library(SvtAv1Enc SHARED IMPORTED GLOBAL) endif() - set_target_properties(SvtAv1Enc PROPERTIES IMPORTED_LOCATION "${SVT_LIBRARY}") + set_target_properties(SvtAv1Enc PROPERTIES IMPORTED_LOCATION "${SVT_LIBRARY}" IMPORTED_IMPLIB "${SVT_LIBRARY}") target_include_directories(SvtAv1Enc INTERFACE ${SVT_INCLUDE_DIR}) endif()