From c1bbd4b1d82e1ec1fff22fb1724335800f25b30d Mon Sep 17 00:00:00 2001 From: Glenn Waldron Date: Fri, 17 May 2024 13:24:50 -0400 Subject: [PATCH] CMake: fix webp, fix silverlining earth file plugin --- src/osgEarthDrivers/CMakeLists.txt | 4 ++-- .../sky_silverlining/CMakeLists.txt | 14 ++++++-------- src/osgEarthDrivers/webp/CMakeLists.txt | 12 ++++++++---- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/osgEarthDrivers/CMakeLists.txt b/src/osgEarthDrivers/CMakeLists.txt index f071448be6..5837f6aae8 100644 --- a/src/osgEarthDrivers/CMakeLists.txt +++ b/src/osgEarthDrivers/CMakeLists.txt @@ -26,14 +26,14 @@ add_subdirectory(sky_gl) add_subdirectory(sky_simple) add_subdirectory(template) add_subdirectory(terrainshader) -add_subdirectory(webp) add_subdirectory(vdatum_egm2008) add_subdirectory(vdatum_egm84) add_subdirectory(vdatum_egm96) add_subdirectory(viewpoints) +add_subdirectory(webp) add_subdirectory(zip) -if(OSGEARTH_BUILD_SILVERLINING_NODEKIT) +if(OSGEARTH_HAVE_SILVERLINING_NODEKIT) add_subdirectory(sky_silverlining) endif() diff --git a/src/osgEarthDrivers/sky_silverlining/CMakeLists.txt b/src/osgEarthDrivers/sky_silverlining/CMakeLists.txt index 0f41f661ca..adbc8fd194 100644 --- a/src/osgEarthDrivers/sky_silverlining/CMakeLists.txt +++ b/src/osgEarthDrivers/sky_silverlining/CMakeLists.txt @@ -1,8 +1,6 @@ -if(SILVERLINING_FOUND) - add_osgearth_plugin( - TARGET osgdb_osgearth_sky_silverlining - SOURCES - SilverLiningDriver.cpp - LIBRARIES - osgEarthSilverLining ) -endif() +add_osgearth_plugin( + TARGET osgdb_osgearth_sky_silverlining + SOURCES + SilverLiningDriver.cpp + LIBRARIES + osgEarthSilverLining ) diff --git a/src/osgEarthDrivers/webp/CMakeLists.txt b/src/osgEarthDrivers/webp/CMakeLists.txt index 6e281c25e8..8a77c3724f 100644 --- a/src/osgEarthDrivers/webp/CMakeLists.txt +++ b/src/osgEarthDrivers/webp/CMakeLists.txt @@ -1,7 +1,11 @@ -if(WEBP_FOUND) - include_directories( ${WEBP_INCLUDE_DIR} ) +find_package(WEBP) + +if (WEBP_FOUND) + message(STATUS "Found WebP ${WEBP_VERSION}") + include_directories(${WEBP_INCLUDE_DIRS}) add_osgearth_plugin( TARGET osgdb_webp - SOURCES ReaderWriterWebP.cpp ) -endif(WEBP_FOUND) + SOURCES ReaderWriterWebP.cpp + LIBRARIES ${WEBP_LIBRARIES}) +endif()