From a44b27d502bcbcbf6d6aad5baa98798e81278143 Mon Sep 17 00:00:00 2001 From: wsnipex Date: Fri, 11 Sep 2015 20:00:52 +0200 Subject: [PATCH] [cmake] fix Texturepacker giflib detection with giflib <= 4 --- tools/depends/native/TexturePacker/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/depends/native/TexturePacker/CMakeLists.txt b/tools/depends/native/TexturePacker/CMakeLists.txt index 93a7750d1e7d1..4090925cc177a 100644 --- a/tools/depends/native/TexturePacker/CMakeLists.txt +++ b/tools/depends/native/TexturePacker/CMakeLists.txt @@ -25,9 +25,13 @@ if(GIF_VERSION LESS 4) else() file(STRINGS ${GIF_INCLUDE_DIR}/gif_lib.h GIFSTRINGS) string(REGEX MATCH "GIFLIB_MAJOR ([0-9])" GIFLIB_MAJOR ${GIFSTRINGS}) - separate_arguments(GIFLIB_MAJOR) - list(GET GIFLIB_MAJOR 1 GIFLIB_MAJOR) - if(GIFLIB_MAJOR LESS 5) + if(GIFLIB_MAJOR) + separate_arguments(GIFLIB_MAJOR) + list(GET GIFLIB_MAJOR 1 GIFLIB_MAJOR) + else() + set(GIFLIB_MAJOR ${GIF_VERSION}) + endif() + if(NOT GIFLIB_MAJOR OR GIFLIB_MAJOR LESS 5) message(WARNING "giflib${GIFLIB_MAJOR} support is experimental. Consider updating to giflib5") endif() endif()