Add CMakeLists.txt and config.h.cmake for giflib.

This commit is contained in:
David Capello 2011-01-16 14:32:21 -03:00
parent c5ccc5110e
commit 701cac25ca
2 changed files with 178 additions and 0 deletions

54
third_party/giflib/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,54 @@
# ASE - Allegro Sprite Editor
# Copyright (C) 2001-2010 David Capello
include_directories(
lib
${CMAKE_CURRENT_BINARY_DIR} # For config.h
)
check_include_files("dlfcn.h" HAVE_DLFCN_H)
check_include_files("fcntl.h" HAVE_FCNTL_H)
check_include_files("gl/gl.h" HAVE_GL_GL_H)
check_include_files("inttypes.h" HAVE_INTTYPES_H)
check_include_files("memory.h" HAVE_MEMORY_H)
check_include_files("rle.h" HAVE_RLE_H)
check_include_files("stdarg.h" HAVE_STDARG_H)
check_include_files("stdint.h" HAVE_STDINT_H)
check_include_files("stdlib.h" HAVE_STDLIB_H)
check_include_files("strings.h" HAVE_STRINGS_H)
check_include_files("string.h" HAVE_STRING_H)
check_include_files("sys/stat.h" HAVE_SYS_STAT_H)
check_include_files("sys/types.h" HAVE_SYS_TYPES_H)
check_include_files("unistd.h" HAVE_UNISTD_H)
check_include_files("varargs.h" HAVE_VARARGS_H)
check_include_files("X11/Xlib.h" HAVE_X11_XLIB_H)
check_include_files("X11/Xutil.h" HAVE_X11_XUTIL_H)
check_function_exists("vprintf" HAVE_VPRINTF)
check_function_exists("_doprnt" HAVE_DOPRNT)
check_function_exists("strdup" HAVE_STRDUP)
if(${HAVE_STDINT_H} or ${HAVE_INTTYPES_H})
set("UINT32" "uint32_t")
else()
set("UINT32" "unsigned int")
endif()
configure_file(config.h.cmake config.h)
add_definitions(-DHAVE_CONFIG_H=1)
if(WIN32)
add_definitions(-DWINDOWS32=1)
endif()
add_library(giflib
lib/dev2gif.c
lib/dgif_lib.c
lib/egif_lib.c
lib/gif_err.c
lib/gif_font.c
lib/gif_hash.c
lib/gifalloc.c
lib/qprintf.c
lib/quantize.c)

124
third_party/giflib/config.h.cmake vendored Normal file
View File

@ -0,0 +1,124 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H ${HAVE_DLFCN_H}
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#cmakedefine HAVE_DOPRNT ${HAVE_DOPRNT}
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H ${HAVE_FCNTL_H}
/* Define to 1 if you have the <gl/gl.h> header file. */
#cmakedefine HAVE_GL_GL_H ${HAVE_GL_GL_H}
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H}
/* Define if the gl_s library is installed (SGI GL library) */
#cmakedefine HAVE_LIBGL_S ${HAVE_LIBGL_S}
/* Define if the X11 library is installed */
#cmakedefine HAVE_LIBX11 ${HAVE_LIBX11}
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H ${HAVE_MEMORY_H}
/* Define to 1 if you have the <rle.h> header file. */
#cmakedefine HAVE_RLE_H ${HAVE_RLE_H}
/* Define to 1 if you have the <stdarg.h> header file. */
#cmakedefine HAVE_STDARG_H ${HAVE_STDARG_H}
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H}
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H ${HAVE_STDLIB_H}
/* Define to 1 if you have the `strdup' function. */
#cmakedefine HAVE_STRDUP ${HAVE_STRDUP}
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H}
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H ${HAVE_STRING_H}
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H ${HAVE_SYS_STAT_H}
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H}
/* Define to 1 if the system has the type `uint32_t'. */
#cmakedefine HAVE_UINT32_T ${HAVE_UINT32_T}
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H}
/* Define to 1 if the system has the type `u_int32_t'. */
#cmakedefine HAVE_U_INT32_T ${HAVE_U_INT32_T}
/* Define to 1 if you have the <varargs.h> header file. */
#cmakedefine HAVE_VARARGS_H ${HAVE_VARARGS_H}
/* Define to 1 if you have the `vprintf' function. */
#cmakedefine HAVE_VPRINTF ${HAVE_VPRINTF}
/* Define to 1 if you have the <X11/Xlib.h> header file. */
#cmakedefine HAVE_X11_XLIB_H ${HAVE_X11_XLIB_H}
/* Define to 1 if you have the <X11/Xutil.h> header file. */
#cmakedefine HAVE_X11_XUTIL_H ${HAVE_X11_XUTIL_H}
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#cmakedefine NO_MINUS_C_MINUS_O ${NO_MINUS_C_MINUS_O}
/* Name of package */
#cmakedefine PACKAGE ${PACKAGE}
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT ${PACKAGE_BUGREPORT}
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME ${PACKAGE_NAME}
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING ${PACKAGE_STRING}
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME ${PACKAGE_TARNAME}
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION ${PACKAGE_VERSION}
/* Define to 1 if the C compiler supports function prototypes. */
#cmakedefine PROTOTYPES ${PROTOTYPES}
/* Define to 1 if the `setvbuf' function takes the buffering type as its
second argument and the buffer pointer as the third, as on System V before
release 3. */
#cmakedefine SETVBUF_REVERSED ${SETVBUF_REVERSED}
/* The size of `unsigned int', as computed by sizeof. */
#cmakedefine SIZEOF_UNSIGNED_INT ${SIZEOF_UNSIGNED_INT}
/* The size of `unsigned long', as computed by sizeof. */
#cmakedefine SIZEOF_UNSIGNED_LONG ${SIZEOF_UNSIGNED_LONG}
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS ${STDC_HEADERS}
/* Set to an unsigned 32 bit integer available on this system */
#cmakedefine UINT32 ${UINT32}
/* Version number of package */
#cmakedefine VERSION ${VERSION}
/* Define to 1 if the X Window System is missing or not being used. */
#cmakedefine X_DISPLAY_MISSING ${X_DISPLAY_MISSING}
/* Define like PROTOTYPES; this can be used by system headers. */
#cmakedefine __PROTOTYPES ${__PROTOTYPES}
/* Define to empty if `const' does not conform to ANSI C. */
#cmakedefine const ${const}