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.
This commit is contained in:
Sacha 2014-06-01 07:55:45 +10:00
parent fd19b8d271
commit e59877558f

View File

@ -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)