Merge pull request #21 from piponazo/configFileFromCMake
New way to generate the include/exiv2/exv_conf.h filev0.27.3
commit
8592c10a3e
@ -0,0 +1,68 @@
|
||||
# Note that the scope of the EXV_ variables in local
|
||||
if (${EXIV2_ENABLE_WEBREADY})
|
||||
set(EXV_USE_SSH ${EXIV2_ENABLE_SSH})
|
||||
set(EXV_USE_CURL ${EXIV2_ENABLE_CURL})
|
||||
endif()
|
||||
set(EXV_ENABLE_VIDEO ${EXIV2_ENABLE_VIDEO})
|
||||
set(EXV_ENABLE_WEBREADY ${EXIV2_ENABLE_WEBREADY})
|
||||
set(EXV_HAVE_LENSDATA ${EXIV2_ENABLE_LENSDATA})
|
||||
set(EXV_HAVE_PRINTUCS2 ${EXIV2_ENABLE_PRINTUCS2})
|
||||
|
||||
set(EXV_PACKAGE ${PACKAGE})
|
||||
set(EXV_PACKAGE_VERSION ${PACKAGE_VERSION})
|
||||
set(EXV_PACKAGE_STRING ${PACKAGE_STRING})
|
||||
set(EXV_HAVE_XMP_TOOLKIT ${HAVE_XMP_TOOLKIT})
|
||||
set(EXV_HAVE_ICONV ${ICONV_FOUND})
|
||||
set(EXV_HAVE_LIBZ ${ZLIB_FOUND})
|
||||
set(EXV_UNICODE_PATH ${EXIV2_ENABLE_WIN_UNICODE})
|
||||
|
||||
# TODO: Try to use the cmake function check_symbol_exists which is more robust
|
||||
check_function_exists( gmtime_r EXV_HAVE_GMTIME_R )
|
||||
check_function_exists( memset EXV_HAVE_MEMSET )
|
||||
check_function_exists( mmap EXV_HAVE_MMAP )
|
||||
check_function_exists( munmap EXV_HAVE_MUNMAP )
|
||||
check_function_exists( strchr EXV_HAVE_STRCHR )
|
||||
check_function_exists( strerror EXV_HAVE_STRERROR )
|
||||
check_function_exists( strerror_r EXV_HAVE_STRERROR_R )
|
||||
check_function_exists( strtol EXV_HAVE_STRTOL )
|
||||
check_function_exists( timegm EXV_HAVE_TIMEGM )
|
||||
|
||||
# TODO : Do something about EXV_STRERROR_R_CHAR_P
|
||||
|
||||
# TODO: This check should be removed and rely on the check done in findDependencies.cmake
|
||||
check_include_file( "libintl.h" EXV_HAVE_LIBINTL_H )
|
||||
check_include_file( "unistd.h" EXV_HAVE_UNISTD_H )
|
||||
check_include_file( "memory.h" EXV_HAVE_MEMORY_H )
|
||||
check_include_file( "process.h" EXV_HAVE_PROCESS_H )
|
||||
check_include_file( "stdbool.h" EXV_HAVE_STDBOOL_H )
|
||||
check_include_file( "stdint.h" EXV_HAVE_STDINT_H )
|
||||
check_include_file( "stdlib.h" EXV_HAVE_STDLIB_H )
|
||||
check_include_file( "strings.h" EXV_HAVE_STRINGS_H )
|
||||
check_include_file( "sys/mman.h" EXV_HAVE_SYS_MMAN_H )
|
||||
check_include_file( "sys/stat.h" EXV_HAVE_SYS_STAT_H )
|
||||
check_include_file( "sys/types.h" EXV_HAVE_SYS_TYPES_H )
|
||||
check_include_file( "regex.h" EXV_HAVE_REGEX )
|
||||
check_include_file( "inttypes.h" EXV_HAVE_INTTYPES_H )
|
||||
|
||||
if (NOT EXV_HAVE_LIBINTL_H)
|
||||
set(EXV_ENABLE_NLS 0)
|
||||
endif()
|
||||
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
#####################################################################################
|
||||
# strerror_r returns char*
|
||||
|
||||
# NOTE : reverting commit #2041, which break compilation under linux and windows
|
||||
|
||||
CHECK_C_SOURCE_COMPILES( "#include <string.h>
|
||||
int main() {
|
||||
char * c;
|
||||
c = strerror_r(0,c,0);
|
||||
return 0;
|
||||
}" EXV_HAVE_DECL_STRERROR_R )
|
||||
|
||||
#####################################################################################
|
||||
|
||||
configure_file( config/config.h.cmake ${CMAKE_SOURCE_DIR}/include/exiv2/exv_conf.h @ONLY)
|
||||
#configure_file( config/config.h.cmake ${CMAKE_SOURCE_DIR}/include/exiv2/exv_conf.h)
|
@ -1,214 +0,0 @@
|
||||
/**/
|
||||
/* exv_msvc.h */
|
||||
|
||||
#pragma once
|
||||
#ifndef _EXV_MSVC_H_
|
||||
#define _EXV_MSVC_H_
|
||||
|
||||
/* Define to 1 if you want to use `libssh' for SshIO. */
|
||||
/* #undef EXV_USE_SSH */
|
||||
|
||||
/* Define to 1 if you want to use `libcurl' in httpIO. */
|
||||
/* #undef EXV_USE_CURL */
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
/* #undef EXV_HAVE_DECL_STRERROR_R */
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
/* #undef EXV_HAVE_GMTIME_R */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
/* #undef EXV_HAVE_INTTYPES_H */
|
||||
|
||||
/* Define to 1 if you have the <libintl.h> header file. */
|
||||
#define EXV_HAVE_LIBINTL_H 1
|
||||
|
||||
/* Define to 1 if you require video support. */
|
||||
/* #undef EXV_ENABLE_VIDEO */
|
||||
|
||||
/* Define to 1 if you require webready support. */
|
||||
/* #undef EXV_ENABLE_WEBREADY */
|
||||
|
||||
#ifndef EXV_COMMERCIAL_VERSION
|
||||
|
||||
/* Define to 1 to enable translation of Nikon lens names. */
|
||||
#define EXV_HAVE_LENSDATA 1
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's
|
||||
native language is requested. */
|
||||
/* #undef EXV_ENABLE_NLS */
|
||||
|
||||
/* Define to 1 if you have the `iconv' function. */
|
||||
/* #undef EXV_HAVE_ICONV */
|
||||
|
||||
/* Define to 1 to enable conversion of UCS2 encoded Windows tags to UTF-8. */
|
||||
#define EXV_HAVE_PRINTUCS2 1
|
||||
|
||||
#endif /* !EXV_COMMERCIAL_VERSION */
|
||||
|
||||
/* Define Windows unicode path support. */
|
||||
/* #define EXV_UNICODE_PATH */
|
||||
|
||||
|
||||
/* Define to `const' or to empty, depending on the second argument of `iconv'. */
|
||||
/* #undef ICONV_ACCEPTS_CONST_INPUT */
|
||||
#if defined ICONV_ACCEPTS_CONST_INPUT
|
||||
#define EXV_ICONV_CONST const
|
||||
#else
|
||||
#define EXV_ICONV_CONST
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <regex.h> header file. */
|
||||
/* #undef EXV_HAVE_REGEX */
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
/* #undef EXV_HAVE_MALLOC */
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
/* #undef EXV_HAVE_MALLOC_H */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
/* #undef EXV_HAVE_MEMORY_H */
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#define EXV_HAVE_MEMSET 1
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
|
||||
and to 0 otherwise. */
|
||||
#define EXV_HAVE_REALLOC 1
|
||||
|
||||
/* Define to 1 if stdbool.h conforms to C99. */
|
||||
/* #undef EXV_HAVE_STDBOOL_H */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
/* #undef EXV_HAVE_STDINT_H */
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
/* #undef EXV_HAVE_STDLIB_H */
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#define EXV_HAVE_STRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define EXV_HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the `strerror_r' function. */
|
||||
/* #undef EXV_HAVE_STRERROR_R */
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
/* #undef EXV_HAVE_STRINGS_H */
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
/* #undef EXV_HAVE_STRING_H */
|
||||
|
||||
/* Define to 1 if you have the `strtol' function. */
|
||||
#define EXV_HAVE_STRTOL 1
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
/* #undef EXV_HAVE_MMAP */
|
||||
|
||||
/* Define to 1 if you have the `munmap' function. */
|
||||
/* #undef EXV_HAVE_MUNMAP */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
/* #undef EXV_HAVE_SYS_STAT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
/* #undef EXV_HAVE_SYS_TIME_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
/* #undef EXV_HAVE_SYS_TYPES_H */
|
||||
|
||||
/* Define to 1 if you have the `timegm' function. */
|
||||
/* #undef EXV_HAVE_TIMEGM */
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
/* #undef EXV_HAVE_UNISTD_H */
|
||||
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#define EXV_HAVE_VPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
/* #undef EXV_HAVE_WCHAR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||
/* #undef EXV_HAVE_SYS_MMAN_H */
|
||||
|
||||
/* Define to 1 if you have the `zlib' library. */
|
||||
#define EXV_HAVE_LIBZ 1
|
||||
|
||||
#if defined(_MSC_VER) && HAVE_LIBZ
|
||||
#if (_MSC_VER < 1400)// && !defined(vsnprintf)
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <process.h> header file. */
|
||||
#define EXV_HAVE_PROCESS_H 1
|
||||
|
||||
/* Define to 1 if you have the Adobe XMP Toolkit. */
|
||||
#define EXV_HAVE_XMP_TOOLKIT 1
|
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */
|
||||
/* #undef EXV_HAVE__BOOL */
|
||||
|
||||
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
|
||||
slash. */
|
||||
/* #undef EXV_LSTAT_FOLLOWS_SLASHED_SYMLINK */
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define EXV_PACKAGE_BUGREPORT "ahuggel@gmx.net"
|
||||
|
||||
/* Define to the name of this package. */
|
||||
#define EXV_PACKAGE "exiv2"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define EXV_PACKAGE_NAME "exiv2"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define EXV_PACKAGE_STRING "exiv2 0.26"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define EXV_PACKAGE_TARNAME "exiv2"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define EXV_PACKAGE_VERSION "0.26"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if strerror_r returns char *. */
|
||||
/* #undef STRERROR_R_CHAR_P */
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
/* #undef TM_IN_SYS_TIME */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
/* #undef malloc */
|
||||
|
||||
/* On Microsoft compilers pid_t has to be set to int. */
|
||||
#ifndef HAVE_PID_T
|
||||
typedef int pid_t;
|
||||
#endif
|
||||
|
||||
/* Define to rpl_realloc if the replacement function should be used. */
|
||||
/* #undef realloc */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
#endif // _EXV_CONF_H_
|
Loading…
Reference in New Issue