Skip to content

Commit

Permalink
[cmake] fix Texturepacker giflib detection with giflib <= 4
Browse files Browse the repository at this point in the history
  • Loading branch information
wsnipex authored and FernetMenta committed Sep 17, 2015
1 parent aee8a01 commit a44b27d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tools/depends/native/TexturePacker/CMakeLists.txt
Expand Up @@ -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()
Expand Down

0 comments on commit a44b27d

Please sign in to comment.