From 5f26bd7df1ee3344516003971ffaa3c5ef20e2bd Mon Sep 17 00:00:00 2001 From: Daniel Emminizer Date: Tue, 3 Dec 2024 06:58:15 -0500 Subject: [PATCH] WebP: sharpyuv only added if target exists, supporting older WebP. --- src/osgEarthDrivers/webp/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osgEarthDrivers/webp/CMakeLists.txt b/src/osgEarthDrivers/webp/CMakeLists.txt index 6205ae9523..5a179d37b3 100644 --- a/src/osgEarthDrivers/webp/CMakeLists.txt +++ b/src/osgEarthDrivers/webp/CMakeLists.txt @@ -5,5 +5,8 @@ if (WebP_FOUND) add_osgearth_plugin( TARGET osgdb_webp SOURCES ReaderWriterWebP.cpp) - target_link_libraries(osgdb_webp PRIVATE WebP::webp WebP::sharpyuv) + target_link_libraries(osgdb_webp PRIVATE WebP::webp) + if(TARGET WebP::sharpyuv) + target_link_libraries(osgdb_webp PRIVATE WebP::sharpyuv) + endif() endif()