mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
cmake: split gif detection from IMG deps
gifdec isn't part of imageio lib, it's only used by gif2webp.
Change-Id: I70bff378a32f8fb2ebb8a5a7701049ffff7f7992
(cherry picked from commit dcbc1c881a
)
This commit is contained in:
parent
bafa90ccd8
commit
ec666c7526
@ -234,12 +234,12 @@ endif()
|
|||||||
|
|
||||||
if(WEBP_BUILD_GIF2WEBP)
|
if(WEBP_BUILD_GIF2WEBP)
|
||||||
# gif2webp
|
# gif2webp
|
||||||
include_directories(${WEBP_DEP_IMG_INCLUDE_DIRS})
|
include_directories(${WEBP_DEP_GIF_INCLUDE_DIRS})
|
||||||
parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "GIF2WEBP_SRCS"
|
parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "GIF2WEBP_SRCS"
|
||||||
"gif2webp")
|
"gif2webp")
|
||||||
add_executable(gif2webp ${GIF2WEBP_SRCS})
|
add_executable(gif2webp ${GIF2WEBP_SRCS})
|
||||||
target_link_libraries(gif2webp exampleutil imageioutil webp webpmux
|
target_link_libraries(gif2webp exampleutil imageioutil webp webpmux
|
||||||
${WEBP_DEP_IMG_LIBRARIES})
|
${WEBP_DEP_GIF_LIBRARIES})
|
||||||
install(TARGETS gif2webp RUNTIME DESTINATION bin)
|
install(TARGETS gif2webp RUNTIME DESTINATION bin)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ endif()
|
|||||||
# Find the standard image libraries.
|
# Find the standard image libraries.
|
||||||
set(WEBP_DEP_IMG_LIBRARIES)
|
set(WEBP_DEP_IMG_LIBRARIES)
|
||||||
set(WEBP_DEP_IMG_INCLUDE_DIRS)
|
set(WEBP_DEP_IMG_INCLUDE_DIRS)
|
||||||
foreach(I_LIB PNG JPEG TIFF GIF)
|
foreach(I_LIB PNG JPEG TIFF)
|
||||||
find_package(${I_LIB})
|
find_package(${I_LIB})
|
||||||
set(WEBP_HAVE_${I_LIB} ${${I_LIB}_FOUND})
|
set(WEBP_HAVE_${I_LIB} ${${I_LIB}_FOUND})
|
||||||
if(${I_LIB}_FOUND)
|
if(${I_LIB}_FOUND)
|
||||||
@ -74,6 +74,16 @@ foreach(I_LIB PNG JPEG TIFF GIF)
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
# GIF detection, gifdec isn't part of the imageio lib.
|
||||||
|
set(WEBP_DEP_GIF_LIBRARIES)
|
||||||
|
set(WEBP_DEP_GIF_INCLUDE_DIRS)
|
||||||
|
find_package(GIF)
|
||||||
|
set(WEBP_HAVE_GIF ${GIF_FOUND})
|
||||||
|
if(GIF_FOUND)
|
||||||
|
list(APPEND WEBP_DEP_GIF_LIBRARIES ${GIF_LIBRARIES})
|
||||||
|
list(APPEND WEBP_DEP_GIF_INCLUDE_DIRS ${GIF_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
## Check for specific headers.
|
## Check for specific headers.
|
||||||
include(CheckIncludeFiles)
|
include(CheckIncludeFiles)
|
||||||
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
|
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
|
||||||
|
Loading…
Reference in New Issue
Block a user