From e59877558fc0b2e8a6cd00ff246c41ffa30d33a8 Mon Sep 17 00:00:00 2001 From: Sacha Date: Sun, 1 Jun 2014 07:55:45 +1000 Subject: [PATCH] Blackberry: buildfix. Give up on supporting multiple libpng. FindPNG doesn't report the specific include dir it uses and the library name doesn't always match. So use libpng17 on Linux/Blackberry too. --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11862c60dc..dad23f4d8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -591,10 +591,9 @@ target_link_libraries(libzip ${ZLIB_LIBRARY}) include_directories(native/ext/libzip) set(LIBZIP_LIBRARY libzip) -# FindPNG does a few things we don't want. So do it ourselves. -# Fixed to libpng16/17, otherwise it can pick up earlier even if newer exists. -find_path(PNG_PNG_INCLUDE_DIR NAMES "libpng16/png.h" "libpng17/png.h") -find_library(PNG_LIBRARY NAMES png16 libpng16 png17 libpng17) +# FindPNG does a few things we don't want. So do it ourselves. Fixed to libpng17 +find_path(PNG_PNG_INCLUDE_DIR NAMES "libpng17/png.h") +find_library(PNG_LIBRARY NAMES png17 libpng17) find_package(PackageHandleStandardArgs) find_package_handle_standard_args(PNG REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR) if (PNG_FOUND)