From 27a9bd3d59e87b09a1957a4ce4238a8fb2893f53 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 27 May 2020 21:38:07 -0400 Subject: [PATCH] Correct find_package libpng -> PNG --- hecl/extern/athena | 2 +- hecl/extern/libpng/CMakeLists.txt | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/hecl/extern/athena b/hecl/extern/athena index 6c52de489..dec27c05e 160000 --- a/hecl/extern/athena +++ b/hecl/extern/athena @@ -1 +1 @@ -Subproject commit 6c52de489f7c2e78fbbd8ea15287f2783c9d5879 +Subproject commit dec27c05ed656b37ef75744688529b67c6f60dcc diff --git a/hecl/extern/libpng/CMakeLists.txt b/hecl/extern/libpng/CMakeLists.txt index 49ad89341..246af563c 100644 --- a/hecl/extern/libpng/CMakeLists.txt +++ b/hecl/extern/libpng/CMakeLists.txt @@ -1,8 +1,5 @@ -if(NOT WIN32 AND NOT APPLE) -find_library(PNG_LIB png) -endif() - -if(WIN32 OR APPLE OR PNG_LIB STREQUAL PNG_LIB-NOTFOUND) +find_package(PNG) +if(NOT PNG_FOUND) message(STATUS "Using HECL's built-in libpng") include_directories(${ZLIB_INCLUDE_DIR}) add_library(png @@ -31,8 +28,8 @@ add_library(png pngwutil.c) set(PNG_LIB png CACHE PATH "PNG library" FORCE) -set(LIBPNG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "PNG include path" FORCE) +set(PNG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "PNG include path" FORCE) else() -find_path(LIBPNG_INCLUDE_DIR png.h) -endif() +find_path(PNG_INCLUDE_DIR png.h) +endif() \ No newline at end of file