Merged all changes from the unstable branch into the trunk.
parent
f74c3bcca2
commit
370af5c8a3
@ -0,0 +1,102 @@
|
|||||||
|
# CMake build system for exiv2 library and executables
|
||||||
|
# Copyright 2008 by Patrick Spendrin <ps_ml@gmx.de>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
# 3. The name of the author may not be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior
|
||||||
|
# written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||||
|
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
project( exiv2 )
|
||||||
|
|
||||||
|
cmake_minimum_required( VERSION 2.6 )
|
||||||
|
|
||||||
|
set( PACKAGE_BUGREPORT "ahuggel@gmx.net" )
|
||||||
|
set( PACKAGE "exiv2" )
|
||||||
|
set( PACKAGE_NAME "exiv2" )
|
||||||
|
set( PACKAGE_STRING "exiv2 0.18.2" )
|
||||||
|
set( PACKAGE_TARNAME "exiv2" )
|
||||||
|
set( PACKAGE_VERSION "0.18.2" )
|
||||||
|
set( GENERIC_LIB_VERSION "5.3.1" )
|
||||||
|
set( GENERIC_LIB_SOVERSION "5" )
|
||||||
|
|
||||||
|
# options and there default values
|
||||||
|
option( EXIV2_ENABLE_SHARED "Build exiv2 as a shared library (dll)" ON )
|
||||||
|
option( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON )
|
||||||
|
option( EXIV2_ENABLE_LIBXMP "Build a static convenience Library for XMP" OFF )
|
||||||
|
option( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON )
|
||||||
|
option( EXIV2_ENABLE_NLS "Build native language support (requires gettext)" OFF )
|
||||||
|
option( EXIV2_ENABLE_PRINTUCS2 "Build with Printucs2" ON )
|
||||||
|
option( EXIV2_ENABLE_LENSDATA "include lens data" ON )
|
||||||
|
option( EXIV2_ENABLE_COMMERCIAL "compile with the EXV_COMMERCIAL_VERSION symbol set" OFF )
|
||||||
|
|
||||||
|
option( BUILD_samples "Build the unit tests" OFF )
|
||||||
|
|
||||||
|
if( MINGW OR UNIX )
|
||||||
|
add_definitions( -Wall -Wcast-align -Wpointer-arith -Wformat-security -Wmissing-format-attribute -Woverloaded-virtual -W )
|
||||||
|
endif( MINGW OR UNIX )
|
||||||
|
|
||||||
|
if( EXIV2_ENABLE_XMP )
|
||||||
|
set( HAVE_XMP_TOOLKIT ON )
|
||||||
|
set( XMPLIB "do" )
|
||||||
|
endif( EXIV2_ENABLE_XMP )
|
||||||
|
|
||||||
|
if( BUILD_samples )
|
||||||
|
EXIV2_ENABLE_TESTING()
|
||||||
|
endif( BUILD_samples )
|
||||||
|
|
||||||
|
|
||||||
|
include( config/ConfigureChecks.cmake )
|
||||||
|
|
||||||
|
set( INSTALL_TARGET_STANDARD_ARGS RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib )
|
||||||
|
|
||||||
|
# add sources from XMPSDK directory - this needs to be done here
|
||||||
|
set( XMPSRC ${CMAKE_SOURCE_DIR}/xmpsdk/src/ExpatAdapter.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/MD5.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/ParseRDF.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/UnicodeConversions.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/WXMPIterator.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/WXMPMeta.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/WXMPUtils.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/XML_Node.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPCore_Impl.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPIterator.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPMeta-GetSet.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPMeta-Parse.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPMeta-Serialize.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPMeta.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPUtils-FileInfo.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPUtils.cpp )
|
||||||
|
|
||||||
|
# the following lines need to be added to circumvent the error in xmpsdk\src\MD5.h
|
||||||
|
if( ${EXV_HAVE_STDINT_H} )
|
||||||
|
add_definitions( -DEXV_HAVE_STDINT_H )
|
||||||
|
endif( ${EXV_HAVE_STDINT_H} )
|
||||||
|
|
||||||
|
add_subdirectory( xmpsdk )
|
||||||
|
add_subdirectory( src )
|
||||||
|
|
||||||
|
if( BUILD_samples )
|
||||||
|
add_subdirectory( samples )
|
||||||
|
endif( BUILD_samples )
|
@ -0,0 +1,80 @@
|
|||||||
|
Exiv2 uses cmake, a cross-platform build system, to control the
|
||||||
|
compilation process using simple platform and compiler independent
|
||||||
|
configuration files.
|
||||||
|
|
||||||
|
The old make and MSVC build files are currently still around but are
|
||||||
|
considered deprecated in the unstable branch. They will disappear once
|
||||||
|
the cmake build process is feature-complete, stable and documented. Or
|
||||||
|
maybe earlier to force me to get there.
|
||||||
|
|
||||||
|
|
||||||
|
Cmake resources
|
||||||
|
===============
|
||||||
|
|
||||||
|
Home: http://www.cmake.org/
|
||||||
|
Help: http://www.cmake.org/cmake/help/help.html
|
||||||
|
Doc: http://www.cmake.org/cmake/help/documentation.html
|
||||||
|
Wiki: http://www.cmake.org/Wiki/CMake
|
||||||
|
FAQ: http://www.cmake.org/Wiki/CMake_FAQ
|
||||||
|
|
||||||
|
|
||||||
|
Building and Installing
|
||||||
|
=======================
|
||||||
|
|
||||||
|
a) From the command line
|
||||||
|
|
||||||
|
Run the following commands from the top directory (containing this
|
||||||
|
file) to configure, build and install the library and utility:
|
||||||
|
|
||||||
|
$ mkdir build
|
||||||
|
$ cd build
|
||||||
|
$ cmake ..
|
||||||
|
$ make
|
||||||
|
$ make install
|
||||||
|
|
||||||
|
To modify the configuration
|
||||||
|
|
||||||
|
$ ccmake ..
|
||||||
|
|
||||||
|
|
||||||
|
Default install locations
|
||||||
|
...
|
||||||
|
|
||||||
|
To uninstall Exiv2, run:
|
||||||
|
|
||||||
|
$ make uninstall >>>>> TODO
|
||||||
|
|
||||||
|
in the meantime, on UNIX-like systems, use
|
||||||
|
|
||||||
|
$ xargs rm < install_manifest.txt
|
||||||
|
|
||||||
|
|
||||||
|
b) Using the cmake GUI
|
||||||
|
|
||||||
|
ccmake
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dependencies
|
||||||
|
============
|
||||||
|
|
||||||
|
cmake itself
|
||||||
|
|
||||||
|
migrate the rest here from README, test one by one
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
Further TODOs:
|
||||||
|
|
||||||
|
* Rename configuration settings to EXIV2_*, e.g., EXIV2_ENABLE_SHARED
|
||||||
|
* Two cmake projects: 1) exiv2 2) samples, common config in config/
|
||||||
|
* Is it possible to not have CMakeLists.txt file in the top dir?
|
||||||
|
* --disable-visibility
|
||||||
|
* cross-compilation
|
||||||
|
* Release build and packaging scripts
|
||||||
|
* emacs M-c command to (re-)compile
|
@ -0,0 +1,59 @@
|
|||||||
|
DONE * Need soname versioning for shared library
|
||||||
|
|
||||||
|
* Need g++ specific DONE compiler options (warnings) and settings (visibility)
|
||||||
|
|
||||||
|
* enable build types in cmake. In case required, add support for it
|
||||||
|
|
||||||
|
* The following options of the configure script should be supported
|
||||||
|
--without-zlib DONE - ENABLE_PNG
|
||||||
|
--disable-nls DONE - ENABLE_NLS ??? that doesn't work correctly here
|
||||||
|
--disable-printucs2 DONE - ENABLE_PRINTUCS2
|
||||||
|
--disable-xmp DONE - ENABLE_XMP
|
||||||
|
--enable-commercial DONE - ENABLE_COMMERCIAL
|
||||||
|
--disable-lensdata DONE - ENABLE_LENSDATA
|
||||||
|
--disable-shared DONE - ENABLE_SHARED_EXIV2
|
||||||
|
|
||||||
|
DONE * Add further messages to display option settings
|
||||||
|
|
||||||
|
------------------------------------------------------------------
|
||||||
|
-- Exiv2 0.18-pre1 feature configuration summary
|
||||||
|
--
|
||||||
|
-- Build a shared library......... NO
|
||||||
|
-- PNG image support.............. YES
|
||||||
|
-- Native language support........ NO
|
||||||
|
|
||||||
|
gettext is required for native language support. Make sure the
|
||||||
|
gettext header files are installed. You can get gettext from
|
||||||
|
http://www.gnu.org/software/gettext/
|
||||||
|
|
||||||
|
-- Conversion of Windows XP tags.. YES
|
||||||
|
-- Nikon lens database............ YES
|
||||||
|
-- XMP metadata support........... YES
|
||||||
|
------------------------------------------------------------------
|
||||||
|
|
||||||
|
* Need targets to build/install doc, DONE man page
|
||||||
|
|
||||||
|
DONE * add possibility to build xmp as a convenience library
|
||||||
|
|
||||||
|
DONE * Compilation fails if Expat (possibly also other dependencies?) is in a
|
||||||
|
non-standard place
|
||||||
|
|
||||||
|
WONTFIX * This is probably not necessary in src/CMakeLists.txt / can be removed:
|
||||||
|
set( LIBEXIV2_SRC ${LIBEXIV2_SRC} getopt_win32.c )
|
||||||
|
it is necessary as both windows compilers do not autoexport
|
||||||
|
|
||||||
|
DONE * Do we need to worry about MSVC warnings like this:
|
||||||
|
d:\home\ahuggel\msys\src\exiv2\src\exif.hpp(245) : warning C4251: 'Exiv2::Exifdatum::value_' : class 'std::auto_ptr<_Ty>' needs to have dll-interface to be used by clients of class 'Exiv2::Exifdatum'
|
||||||
|
with
|
||||||
|
[
|
||||||
|
_Ty=Exiv2::Value
|
||||||
|
]
|
||||||
|
|
||||||
|
* add information on how to cross-compile on Linux for Windows (MinGW) (some applications and
|
||||||
|
my own release-build process need this) to the README.cmake
|
||||||
|
|
||||||
|
INFO * check How does cmake handle RPATH? (I'll read up on this)
|
||||||
|
|
||||||
|
DONE * Is the pkgconfig file not installed in MinGW? - it is now
|
||||||
|
|
||||||
|
* Can the logic needed to build the doc be re-written using cmake?
|
@ -0,0 +1,253 @@
|
|||||||
|
# CMake build system for exiv2 library and executables
|
||||||
|
# Copyright 2008 by Patrick Spendrin <ps_ml@gmx.de>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
# 3. The name of the author may not be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior
|
||||||
|
# written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||||
|
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
# ConfigureChecks for exiv2
|
||||||
|
|
||||||
|
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/config )
|
||||||
|
include( CheckIncludeFile )
|
||||||
|
include( CheckFunctionExists )
|
||||||
|
include( CheckSymbolExists )
|
||||||
|
include( CheckCSourceCompiles )
|
||||||
|
|
||||||
|
set( STDC_HEADERS ON )
|
||||||
|
set( HAVE_DECL_STRERROR_R 0 )
|
||||||
|
|
||||||
|
set( HAVE_PRINTUCS2 ${EXIV2_ENABLE_PRINTUCS2} )
|
||||||
|
set( HAVE_LENSDATA ${EXIV2_ENABLE_LENSDATA} )
|
||||||
|
|
||||||
|
include_directories( ${CMAKE_INCLUDE_PATH} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/xmpsdk/include )
|
||||||
|
link_directories( ${CMAKE_LIBRARY_PATH} )
|
||||||
|
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH} )
|
||||||
|
|
||||||
|
if( EXIV2_ENABLE_PNG )
|
||||||
|
find_package( ZLIB )
|
||||||
|
include_directories( ${ZLIB_INCLUDE_DIR} )
|
||||||
|
set (HAVE_LIBZ ${ZLIB_FOUND})
|
||||||
|
endif( EXIV2_ENABLE_PNG )
|
||||||
|
|
||||||
|
if (EXIV2_ENABLE_XMP)
|
||||||
|
find_package(EXPAT)
|
||||||
|
include_directories(${EXPAT_INCLUDE_DIR})
|
||||||
|
# FindEXPAT.cmake doesn't check for REQUIRED flags - so we need to check ourselves
|
||||||
|
if (NOT EXPAT_FOUND)
|
||||||
|
message(FATAL_ERROR "missing library expat required for XMP")
|
||||||
|
endif( NOT EXPAT_FOUND )
|
||||||
|
endif (EXIV2_ENABLE_XMP)
|
||||||
|
|
||||||
|
if( EXIV2_ENABLE_SHARED )
|
||||||
|
add_definitions( -DEXV_HAVE_DLL )
|
||||||
|
set( STATIC_FLAG SHARED )
|
||||||
|
else( EXIV2_ENABLE_SHARED )
|
||||||
|
set( STATIC_FLAG STATIC )
|
||||||
|
endif( EXIV2_ENABLE_SHARED )
|
||||||
|
|
||||||
|
if( EXIV2_ENABLE_NLS )
|
||||||
|
if( NOT LOCALEDIR )
|
||||||
|
set( LOCALEDIR "\"${CMAKE_INSTALL_PREFIX}/share/locale\"" )
|
||||||
|
if( WIN32 )
|
||||||
|
string( REPLACE "/" "\\\\" LOCALEDIR ${LOCALEDIR} )
|
||||||
|
endif( WIN32 )
|
||||||
|
endif( NOT LOCALEDIR )
|
||||||
|
add_definitions( -DEXV_LOCALEDIR=${LOCALEDIR} )
|
||||||
|
endif( EXIV2_ENABLE_NLS )
|
||||||
|
|
||||||
|
if( EXIV2_ENABLE_COMMERCIAL )
|
||||||
|
add_definitions( -DEXV_COMMERCIAL_VERSION )
|
||||||
|
endif( EXIV2_ENABLE_COMMERCIAL )
|
||||||
|
|
||||||
|
find_package(Iconv)
|
||||||
|
if( ICONV_TEST )
|
||||||
|
set( HAVE_ICONV 1 )
|
||||||
|
message ( "================> ICONV_LIBRARIES : " ${ICONV_LIBRARIES} )
|
||||||
|
endif( ICONV_TEST )
|
||||||
|
if( ICONV_ACCEPTS_CONST_INPUT )
|
||||||
|
set( ICONV_CONST "const" )
|
||||||
|
endif( ICONV_ACCEPTS_CONST_INPUT )
|
||||||
|
|
||||||
|
# checking for Header files
|
||||||
|
check_include_file( "inttypes.h" HAVE_INTTYPES_H )
|
||||||
|
check_include_file( "libintl.h" HAVE_LIBINTL_H )
|
||||||
|
check_include_file( "malloc.h" HAVE_MALLOC_H )
|
||||||
|
check_include_file( "memory.h" HAVE_MEMORY_H )
|
||||||
|
check_include_file( "iconv.h" HAVE_ICONV_H )
|
||||||
|
check_include_file( "stdbool.h" HAVE_STDBOOL_H )
|
||||||
|
check_include_file( "stdint.h" HAVE_STDINT_H )
|
||||||
|
check_include_file( "stdlib.h" HAVE_STDLIB_H )
|
||||||
|
check_include_file( "string.h" HAVE_STRING_H )
|
||||||
|
check_include_file( "strings.h" HAVE_STRINGS_H )
|
||||||
|
check_include_file( "unistd.h" HAVE_UNISTD_H )
|
||||||
|
check_include_file( "wchar.h" HAVE_WCHAR_H )
|
||||||
|
check_include_file( "sys/stat.h" HAVE_SYS_STAT_H )
|
||||||
|
check_include_file( "sys/time.h" HAVE_SYS_TIME_H )
|
||||||
|
check_include_file( "sys/types.h" HAVE_SYS_TYPES_H )
|
||||||
|
check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H )
|
||||||
|
check_include_file( "process.h" HAVE_PROCESS_H )
|
||||||
|
|
||||||
|
check_function_exists( alarm HAVE_ALARM )
|
||||||
|
check_function_exists( gmtime_r HAVE_GMTIME_R )
|
||||||
|
check_function_exists( malloc HAVE_MALLOC )
|
||||||
|
check_function_exists( memset HAVE_MEMSET )
|
||||||
|
check_function_exists( mmap HAVE_MMAP )
|
||||||
|
check_function_exists( munmap HAVE_MUNMAP )
|
||||||
|
check_function_exists( realloc HAVE_REALLOC )
|
||||||
|
check_function_exists( strchr HAVE_STRCHR )
|
||||||
|
check_function_exists( strchr_r HAVE_STRCHR_R )
|
||||||
|
check_function_exists( strerror HAVE_STRERROR )
|
||||||
|
check_function_exists( strerror_r HAVE_STRERROR_R )
|
||||||
|
check_function_exists( strtol HAVE_STRTOL )
|
||||||
|
check_function_exists( timegm HAVE_TIMEGM )
|
||||||
|
check_function_exists( vprintf HAVE_VPRINTF )
|
||||||
|
|
||||||
|
message( STATUS "None: ${CMAKE_CXX_FLAGS}" )
|
||||||
|
message( STATUS "Debug: ${CMAKE_CXX_FLAGS_DEBUG}" )
|
||||||
|
message( STATUS "Release: ${CMAKE_CXX_FLAGS_RELEASE}" )
|
||||||
|
message( STATUS "RelWithDebInfo: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" )
|
||||||
|
message( STATUS "MinSizeRel: ${CMAKE_CXX_FLAGS_MINSIZEREL}" )
|
||||||
|
|
||||||
|
if( HAVE_STDBOOL_H )
|
||||||
|
check_symbol_exists( "_Bool" stdbool.h HAVE__BOOL )
|
||||||
|
endif( HAVE_STDBOOL_H )
|
||||||
|
|
||||||
|
# struct tm in sys/time.h
|
||||||
|
if( HAVE_SYS_TIME_H )
|
||||||
|
check_c_source_compiles( "#include <sys/time.h>
|
||||||
|
int main() {
|
||||||
|
struct tm t;
|
||||||
|
return 0;
|
||||||
|
}" TM_IN_SYS_TIME )
|
||||||
|
endif( HAVE_SYS_TIME_H )
|
||||||
|
|
||||||
|
# strerror_r returns char*
|
||||||
|
check_c_source_compiles( "#include <string.h>
|
||||||
|
int main() {
|
||||||
|
char * c;
|
||||||
|
c = strerror_r(0,c,0);
|
||||||
|
return 0;
|
||||||
|
}" STRERROR_R_CHAR_P )
|
||||||
|
|
||||||
|
#function is declared with the above
|
||||||
|
if( STRERROR_R_CHAR_P )
|
||||||
|
set( HAVE_DECL_STRERROR_R 1 )
|
||||||
|
endif( STRERROR_R_CHAR_P )
|
||||||
|
|
||||||
|
# time.h and sys/time.h can be included in the same file
|
||||||
|
check_c_source_compiles( "#include <time.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
int main() {
|
||||||
|
return 0;
|
||||||
|
}" TIME_WITH_SYS_TIME )
|
||||||
|
|
||||||
|
# for msvc define to int in exv_conf.h
|
||||||
|
if( NOT MSVC )
|
||||||
|
set( HAVE_PID_T TRUE )
|
||||||
|
endif( NOT MSVC )
|
||||||
|
|
||||||
|
set( EXV_SYMBOLS
|
||||||
|
ENABLE_NLS
|
||||||
|
HAVE_ALARM
|
||||||
|
HAVE_DECL_STRERROR_R
|
||||||
|
HAVE_GMTIME_R
|
||||||
|
HAVE_ICONV
|
||||||
|
HAVE_ICONV_H
|
||||||
|
HAVE_INTTYPES_H
|
||||||
|
HAVE_LENSDATA
|
||||||
|
HAVE_LIBINTL_H
|
||||||
|
HAVE_LIBZ
|
||||||
|
HAVE_MALLOC_H
|
||||||
|
HAVE_MEMORY_H
|
||||||
|
HAVE_MEMSET
|
||||||
|
HAVE_MMAP
|
||||||
|
HAVE_MUNMAP
|
||||||
|
HAVE_PRINTUCS2
|
||||||
|
HAVE_PROCESS_H
|
||||||
|
HAVE_REALLOC
|
||||||
|
HAVE_STDBOOL_H
|
||||||
|
HAVE_STDINT_H
|
||||||
|
HAVE_STDLIB_H
|
||||||
|
HAVE_STRCHR
|
||||||
|
HAVE_STRCHR_R
|
||||||
|
HAVE_STRERROR
|
||||||
|
HAVE_STRERROR_R
|
||||||
|
HAVE_STRINGS_H
|
||||||
|
HAVE_STRING_H
|
||||||
|
HAVE_STRTOL
|
||||||
|
HAVE_SYS_MMAN_H
|
||||||
|
HAVE_SYS_STAT_H
|
||||||
|
HAVE_SYS_TIME_H
|
||||||
|
HAVE_SYS_TYPES_H
|
||||||
|
HAVE_TIMEGM
|
||||||
|
HAVE_UNISTD_H
|
||||||
|
HAVE_VPRINTF
|
||||||
|
HAVE_WCHAR_H
|
||||||
|
HAVE_XMP_TOOLKIT
|
||||||
|
HAVE__BOOL
|
||||||
|
ICONV_CONST
|
||||||
|
PACKAGE
|
||||||
|
PACKAGE_BUGREPORT
|
||||||
|
PACKAGE_NAME
|
||||||
|
PACKAGE_STRING
|
||||||
|
PACKAGE_TARNAME
|
||||||
|
PACKAGE_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach( entry ${EXV_SYMBOLS} )
|
||||||
|
set( EXV_${entry} ${${entry}} )
|
||||||
|
endforeach( entry ${EXV_SYMBOLS} )
|
||||||
|
|
||||||
|
configure_file( config/config.h.cmake ${CMAKE_BINARY_DIR}/exv_conf.h )
|
||||||
|
configure_file( config/exv_msvc.h.cmake ${CMAKE_BINARY_DIR}/exv_msvc.h COPYONLY )
|
||||||
|
install( FILES ${CMAKE_BINARY_DIR}/exv_conf.h DESTINATION include/exiv2 )
|
||||||
|
install( FILES ${CMAKE_BINARY_DIR}/exv_msvc.h DESTINATION include/exiv2 )
|
||||||
|
|
||||||
|
if( NOT MSVC )
|
||||||
|
configure_file( config/exiv2.pc.cmake ${CMAKE_BINARY_DIR}/exiv2.pc )
|
||||||
|
install( FILES ${CMAKE_BINARY_DIR}/exiv2.pc DESTINATION lib/pkgconfig )
|
||||||
|
endif( NOT MSVC )
|
||||||
|
|
||||||
|
# ******************************************************************************
|
||||||
|
# output chosen build options
|
||||||
|
macro( OptionOutput _outputstring )
|
||||||
|
if( ${ARGN} )
|
||||||
|
set( _var "YES" )
|
||||||
|
else( ${ARGN} )
|
||||||
|
set( _var "NO" )
|
||||||
|
endif( ${ARGN} )
|
||||||
|
message( STATUS "${_outputstring}${_var}" )
|
||||||
|
endmacro( OptionOutput _outputstring )
|
||||||
|
|
||||||
|
message( STATUS "-------------------------------------------------------------" )
|
||||||
|
OptionOutput( "Building PNG support: " EXIV2_ENABLE_PNG AND ZLIB_FOUND )
|
||||||
|
OptionOutput( "Building shared library: " EXIV2_ENABLE_SHARED )
|
||||||
|
OptionOutput( "XMP metadata support: " EXIV2_ENABLE_XMP )
|
||||||
|
OptionOutput( "Building static libxmp: " ENABLE_LIBXMP )
|
||||||
|
OptionOutput( "Native language support: " EXIV2_ENABLE_NLS )
|
||||||
|
OptionOutput( "Conversion of Windows XP tags: " EXIV2_ENABLE_PRINTUCS2 )
|
||||||
|
OptionOutput( "Nikon lens database: " EXIV2_ENABLE_LENSDATA )
|
||||||
|
OptionOutput( "commercial build: " EXIV2_ENABLE_COMMERCIAL )
|
||||||
|
message( STATUS "-------------------------------------------------------------" )
|
@ -0,0 +1,28 @@
|
|||||||
|
# - Find expat
|
||||||
|
# Find the native EXPAT headers and libraries.
|
||||||
|
#
|
||||||
|
# EXPAT_INCLUDE_DIRS - where to find expat.h, etc.
|
||||||
|
# EXPAT_LIBRARIES - List of libraries when using expat.
|
||||||
|
# EXPAT_FOUND - True if expat found.
|
||||||
|
|
||||||
|
# Look for the header file.
|
||||||
|
FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h)
|
||||||
|
|
||||||
|
# Look for the library.
|
||||||
|
FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat)
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT DEFAULT_MSG EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
|
||||||
|
|
||||||
|
# Copy the results to the output variables.
|
||||||
|
IF(EXPAT_FOUND)
|
||||||
|
SET(EXPAT_LIBRARIES ${EXPAT_LIBRARY})
|
||||||
|
SET(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR})
|
||||||
|
ELSE(EXPAT_FOUND)
|
||||||
|
SET(EXPAT_LIBRARIES)
|
||||||
|
SET(EXPAT_INCLUDE_DIRS)
|
||||||
|
ENDIF(EXPAT_FOUND)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(EXPAT_INCLUDE_DIR EXPAT_LIBRARY)
|
@ -0,0 +1,87 @@
|
|||||||
|
# vim:ts=4:sw=4:expandtab:autoindent:
|
||||||
|
#
|
||||||
|
# The MIT License
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008, 2009 Aristid Breitkreuz, Ash Berlin, Ruediger Sonderfeld
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
# THE SOFTWARE.
|
||||||
|
#
|
||||||
|
|
||||||
|
Include(CheckFunctionExists)
|
||||||
|
include(CheckCXXSourceCompiles)
|
||||||
|
|
||||||
|
if(ICONV_INCLUDE_DIR)
|
||||||
|
set(ICONV_FIND_QUIETLY TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(ICONV_INCLUDE_DIR iconv.h)
|
||||||
|
|
||||||
|
if(NOT ICONV_INCLUDE_DIR STREQUAL "ICONV_INCLUDE_DIR-NOTFOUND")
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||||
|
check_function_exists(iconv_open ICONV_IN_GLIBC)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT ICONV_IN_GLIBC)
|
||||||
|
find_library(ICONV_LIBRARY NAMES iconv)
|
||||||
|
set(ICONV_TEST ${ICONV_LIBRARY})
|
||||||
|
else()
|
||||||
|
set(ICONV_TEST "In glibc")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
|
||||||
|
check_cxx_source_compiles(
|
||||||
|
"#include <iconv.h>
|
||||||
|
int main() {
|
||||||
|
iconv(iconv_t(-1), 0, 0, 0, 0);
|
||||||
|
}"
|
||||||
|
ICONV_COMPILES)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(ICONV DEFAULT_MSG ICONV_TEST ICONV_INCLUDE_DIR ICONV_COMPILES)
|
||||||
|
|
||||||
|
if(ICONV_FOUND)
|
||||||
|
set(ICONV_LIBRARIES ${ICONV_LIBRARY})
|
||||||
|
else(ICONV_FOUND)
|
||||||
|
set(ICONV_LIBRARIES)
|
||||||
|
endif(ICONV_FOUND)
|
||||||
|
|
||||||
|
if(ICONV_FOUND)
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
||||||
|
check_cxx_source_compiles(
|
||||||
|
"#include <iconv.h>
|
||||||
|
int main() {
|
||||||
|
char *p = 0;
|
||||||
|
iconv(iconv_t(-1), &p, 0, 0, 0);
|
||||||
|
}"
|
||||||
|
ICONV_ACCEPTS_NONCONST_INPUT)
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
||||||
|
check_cxx_source_compiles(
|
||||||
|
"#include <iconv.h>
|
||||||
|
int main() {
|
||||||
|
char const *p = 0;
|
||||||
|
iconv(iconv_t(-1), &p, 0, 0, 0);
|
||||||
|
}"
|
||||||
|
ICONV_ACCEPTS_CONST_INPUT)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(ICONV_LIBRARY ICONV_INCLUDE_DIR)
|
@ -0,0 +1,243 @@
|
|||||||
|
/**/
|
||||||
|
/* config.h. Generated by cmake from config.h.cmake. */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `alarm' function. */
|
||||||
|
#cmakedefine EXV_HAVE_ALARM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#cmakedefine EXV_HAVE_DECL_STRERROR_R 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `gmtime_r' function. */
|
||||||
|
#cmakedefine EXV_HAVE_GMTIME_R 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_INTTYPES_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <libintl.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_LIBINTL_H 1
|
||||||
|
|
||||||
|
#ifndef EXV_COMMERCIAL_VERSION
|
||||||
|
|
||||||
|
/* Define to 1 to enable translation of Exif.Nikon3.LensData. */
|
||||||
|
#cmakedefine EXV_HAVE_LENSDATA 1
|
||||||
|
|
||||||
|
/* Define to 1 if translation of program messages to the user's
|
||||||
|
native language is requested. */
|
||||||
|
#cmakedefine EXV_ENABLE_NLS 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `iconv' function. */
|
||||||
|
#cmakedefine EXV_HAVE_ICONV 1
|
||||||
|
|
||||||
|
/* Define to 1 to enable conversion of UCS2 encoded Windows tags to UTF-8. */
|
||||||
|
#cmakedefine EXV_HAVE_PRINTUCS2 1
|
||||||
|
|
||||||
|
#endif /* !EXV_COMMERCIAL_VERSION */
|
||||||
|
|
||||||
|
/* Define to `const' or to empty, depending on the second argument of `iconv'. */
|
||||||
|
#define EXV_ICONV_CONST
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <libintl.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_LIBINTL_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||||
|
to 0 otherwise. */
|
||||||
|
#cmakedefine EXV_HAVE_MALLOC 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <malloc.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_MALLOC_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_MEMORY_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memset' function. */
|
||||||
|
#cmakedefine EXV_HAVE_MEMSET 1
|
||||||
|
|
||||||
|
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
|
||||||
|
and to 0 otherwise. */
|
||||||
|
#cmakedefine EXV_HAVE_REALLOC 1
|
||||||
|
|
||||||
|
/* Define to 1 if stdbool.h conforms to C99. */
|
||||||
|
#cmakedefine EXV_HAVE_STDBOOL_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_STDINT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_STDLIB_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strchr' function. */
|
||||||
|
#cmakedefine EXV_HAVE_STRCHR 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strerror' function. */
|
||||||
|
#cmakedefine EXV_HAVE_STRERROR 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strerror_r' function. */
|
||||||
|
#cmakedefine EXV_HAVE_STRERROR_R 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_STRINGS_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_STRING_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtol' function. */
|
||||||
|
#cmakedefine EXV_HAVE_STRTOL 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `mmap' function. */
|
||||||
|
#cmakedefine EXV_HAVE_MMAP 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `munmap' function. */
|
||||||
|
#cmakedefine EXV_HAVE_MUNMAP 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_SYS_STAT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_SYS_TIME_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `timegm' function. */
|
||||||
|
#cmakedefine EXV_HAVE_TIMEGM 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_UNISTD_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vprintf' function. */
|
||||||
|
#cmakedefine EXV_HAVE_VPRINTF 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <wchar.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_WCHAR_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_SYS_MMAN_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `zlib' library. */
|
||||||
|
#cmakedefine EXV_HAVE_LIBZ 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <process.h> header file. */
|
||||||
|
#cmakedefine EXV_HAVE_PROCESS_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the Adobe XMP Toolkit. */
|
||||||
|
#cmakedefine EXV_HAVE_XMP_TOOLKIT 1
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `_Bool'. */
|
||||||
|
#cmakedefine EXV_HAVE__BOOL 1
|
||||||
|
|
||||||
|
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
|
||||||
|
slash. */
|
||||||
|
#cmakedefine EXV_LSTAT_FOLLOWS_SLASHED_SYMLINK 1
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#cmakedefine EXV_PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||||
|
|
||||||
|
/* Define to the name of this package. */
|
||||||
|
#cmakedefine EXV_PACKAGE "@PACKAGE@"
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#cmakedefine EXV_PACKAGE_NAME "@PACKAGE_NAME@"
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#cmakedefine EXV_PACKAGE_STRING "@PACKAGE_STRING@"
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#cmakedefine EXV_PACKAGE_TARNAME "@PACKAGE_TARNAME@"
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#cmakedefine EXV_PACKAGE_VERSION "@PACKAGE_VERSION@"
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#cmakedefine STDC_HEADERS 1
|
||||||
|
|
||||||
|
/* Define to 1 if strerror_r returns char *. */
|
||||||
|
#cmakedefine STRERROR_R_CHAR_P 1
|
||||||
|
|
||||||
|
/* 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'. */
|
||||||
|
#cmakedefine TM_IN_SYS_TIME 1
|
||||||
|
|
||||||
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
#cmakedefine 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
|
||||||
|
#cmakedefine inline
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to rpl_malloc if the replacement function should be used. */
|
||||||
|
#cmakedefine malloc
|
||||||
|
|
||||||
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
|
#cmakedefine HAVE_PID_T 1
|
||||||
|
|
||||||
|
/* 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. */
|
||||||
|
#cmakedefine realloc
|
||||||
|
|
||||||
|
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||||
|
#cmakedefine size_t
|
||||||
|
|
||||||
|
#if defined __CYGWIN32__ && !defined __CYGWIN__
|
||||||
|
/* For backwards compatibility with Cygwin b19 and
|
||||||
|
earlier, we define __CYGWIN__ here, so that
|
||||||
|
we can rely on checking just for that macro. */
|
||||||
|
#define __CYGWIN__ __CYGWIN32__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* File path seperator */
|
||||||
|
#if defined WIN32 && !defined __CYGWIN__
|
||||||
|
#define EXV_SEPERATOR_STR "\\"
|
||||||
|
#define EXV_SEPERATOR_CHR '\\'
|
||||||
|
#else
|
||||||
|
#define EXV_SEPERATOR_STR "/"
|
||||||
|
#define EXV_SEPERATOR_CHR '/'
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Shared library support, see http://gcc.gnu.org/wiki/Visibility */
|
||||||
|
#ifdef WIN32
|
||||||
|
# define EXV_IMPORT __declspec(dllimport)
|
||||||
|
# define EXV_EXPORT __declspec(dllexport)
|
||||||
|
# define EXV_DLLLOCAL
|
||||||
|
# define EXV_DLLPUBLIC
|
||||||
|
#else
|
||||||
|
# ifdef EXV_HAVE_GXXCLASSVISIBILITY
|
||||||
|
# define EXV_IMPORT __attribute__ ((visibility("default")))
|
||||||
|
# define EXV_EXPORT __attribute__ ((visibility("default")))
|
||||||
|
# define EXV_DLLLOCAL __attribute__ ((visibility("hidden")))
|
||||||
|
# define EXV_DLLPUBLIC __attribute__ ((visibility("default")))
|
||||||
|
# else
|
||||||
|
# define EXV_IMPORT
|
||||||
|
# define EXV_EXPORT
|
||||||
|
# define EXV_DLLLOCAL
|
||||||
|
# define EXV_DLLPUBLIC
|
||||||
|
# endif /* ! EXV_HAVE_GXXCLASSVISIBILITY */
|
||||||
|
#endif /* ! WIN32 */
|
||||||
|
|
||||||
|
/* Define EXIV2API for DLL builds */
|
||||||
|
#ifdef EXV_HAVE_DLL
|
||||||
|
# ifdef EXV_BUILDING_LIB
|
||||||
|
# define EXIV2API EXV_EXPORT
|
||||||
|
# else
|
||||||
|
# define EXIV2API EXV_IMPORT
|
||||||
|
# endif /* ! EXV_BUILDING_LIB */
|
||||||
|
#else
|
||||||
|
# define EXIV2API
|
||||||
|
#endif /* ! EXV_HAVE_DLL */
|
||||||
|
|
||||||
|
/*
|
||||||
|
Visual Studio C++ 2005 (8.0)
|
||||||
|
Disable warnings about 'deprecated' standard functions
|
||||||
|
See, eg. http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=259
|
||||||
|
*/
|
||||||
|
#if _MSC_VER >= 1400
|
||||||
|
# pragma warning(disable : 4996 4251)
|
||||||
|
#endif
|
@ -0,0 +1,10 @@
|
|||||||
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: exiv2
|
||||||
|
Description: Exif and IPTC metadata library and tools
|
||||||
|
Version: @PACKAGE_VERSION@
|
||||||
|
Libs: -L${libdir} -lexiv2 @EXV_LIB_STATIC@
|
||||||
|
Cflags: -I${includedir}
|
@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
This file redirects to the configuration header file generated by cmake.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "exv_conf.h"
|
@ -0,0 +1,399 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.10"
|
||||||
|
Name="convert-test"
|
||||||
|
ProjectGUID="{2F4235D0-B5F5-4C59-981D-BA006734B56E}"
|
||||||
|
RootNamespace="convert-test"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="Debug"
|
||||||
|
IntermediateDirectory="Debug"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine=""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:MSVCRTD"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\debug\libexpatMT.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_LIB_Debug\zlibd.lib"
|
||||||
|
OutputFile="$(OutDir)/convert-test.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories=""
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/convert-test.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="Release"
|
||||||
|
IntermediateDirectory="Release"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine=""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_NDEBUG;_CONSOLE"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:MSVCRT"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\release\libexpatMT.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_LIB_Release\zlib.lib"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="DebugDLL|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
Description="copy expat dll"
|
||||||
|
CommandLine="copy/y ..\..\..\expat-2.0.1\win32\bin\debug\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;EXV_HAVE_DLL"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
Description="copy the dlls"
|
||||||
|
CommandLine="copy/y ..\exiv2lib\$(ConfigurationName)\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:LIBCMTD"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\release\libexpat.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_DLL_Debug\zlib1d.lib"
|
||||||
|
OutputFile="$(OutDir)/convert-test.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/convert-test.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="ReleaseDLL|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
Description="copy expat dll"
|
||||||
|
CommandLine="copy/y ..\..\..\expat-2.0.1\win32\bin\release\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_NDEBUG;_CONSOLE;EXV_HAVE_DLL"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
Description="copy the dlls"
|
||||||
|
CommandLine="copy/y ..\exiv2lib\$(ConfigurationName)\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:LIBCMT"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\debug\libexpat.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_DLL_Release\zlib1.lib"
|
||||||
|
OutputFile="$(OutDir)/convert-test.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/convert-test.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\samples\convert-test.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
This file is part of the KDE libraries
|
||||||
|
Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
|
||||||
|
|
||||||
|
These sources are based on ftp://g.oswego.edu/pub/misc/malloc.c
|
||||||
|
file by Doug Lea, released to the public domain.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License version 2 as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KDEWIN_SYS_MMAN_H
|
||||||
|
#define KDEWIN_SYS_MMAN_H
|
||||||
|
|
||||||
|
// include everywhere
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PROT_NONE 0
|
||||||
|
#define PROT_READ 1
|
||||||
|
#define PROT_WRITE 2
|
||||||
|
#define PROT_EXEC 4
|
||||||
|
|
||||||
|
/* These values don't really matter in windows mmap emulation */
|
||||||
|
#define MAP_FILE 0
|
||||||
|
#define MAP_SHARED 1
|
||||||
|
#define MAP_PRIVATE 2
|
||||||
|
#define MAP_TYPE 0xF
|
||||||
|
#define MAP_FIXED 0x10
|
||||||
|
#define MAP_ANONYMOUS 0x20
|
||||||
|
#define MAP_ANON MAP_ANONYMOUS
|
||||||
|
|
||||||
|
#define MAP_FAILED ((void *)-1)
|
||||||
|
|
||||||
|
KDEWIN32_EXPORT void *mmap(void *start, size_t length, int prot , int flags, int fd, off_t offset);
|
||||||
|
KDEWIN32_EXPORT int munmap(void *start, size_t length);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // KDEWIN_SYS_MMAN_H
|
@ -0,0 +1,7 @@
|
|||||||
|
#ifndef _sys_socket_h_
|
||||||
|
#define _sys_socket_h_
|
||||||
|
|
||||||
|
// rmills
|
||||||
|
// minimum to enable mmap.cpp to compile without change
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef _types_h_
|
||||||
|
#define _types_h_
|
||||||
|
// rmills
|
||||||
|
// minimum required by exiv2
|
||||||
|
//
|
||||||
|
#include "winposix_export.h"
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
#ifndef _WINPOSIX_EXPORT_H_
|
||||||
|
#define _WINPOSIX_EXPORT_H_
|
||||||
|
|
||||||
|
// rmills
|
||||||
|
// msvc/include/winposix_export.h
|
||||||
|
//
|
||||||
|
// I'm very appreciative and respectful of the work of Jaroslaw Staniek <js@iidea.pl>
|
||||||
|
// in the KDE libraries where I found msvc/src/mmap.cpp and msvc/mman.h
|
||||||
|
//
|
||||||
|
// http://websvn.kde.org/trunk/KDE/kdelibs/win/include/msvc/sys/mman.h?revision=517357&view=markup&pathrev=519502
|
||||||
|
// http://websvn.kde.org/trunk/KDE/kdelibs/win/src/mmap.c?revision=519502&view=markup&pathrev=519502
|
||||||
|
|
||||||
|
// I have commented 2 essential tiny changes in mmap.cpp to make it compile with MSVC
|
||||||
|
// I've also added a dummy sys/socket.h and sys/types.h file to keep everybody happy!
|
||||||
|
//
|
||||||
|
// the contents of this file are the minimum required to enable exiv2 to compile link and execute the mmap.cpp code
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef ENOTSUP
|
||||||
|
#define ENOTSUP 911
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef off_t
|
||||||
|
#define off_t size_t
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef KDEWIN32_EXPORT
|
||||||
|
#define KDEWIN32_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// give MSVC 7.1 (VS 2003 .Net) encouragement to ignore _set_errno !
|
||||||
|
#if _MSC_VER < 1400
|
||||||
|
#ifndef _set_errno
|
||||||
|
#define _set_errno(x)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,399 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.10"
|
||||||
|
Name="mmap-test"
|
||||||
|
ProjectGUID="{2F4235D0-B5F5-4C59-981D-BA006734B56E}"
|
||||||
|
RootNamespace="mmap-test"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="Debug"
|
||||||
|
IntermediateDirectory="Debug"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine=""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:MSVCRTD"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\debug\libexpatMT.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_LIB_Debug\zlibd.lib"
|
||||||
|
OutputFile="$(OutDir)/mmap-test.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories=""
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/mmap-test.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="Release"
|
||||||
|
IntermediateDirectory="Release"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine=""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_NDEBUG;_CONSOLE"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:MSVCRT"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\release\libexpatMT.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_LIB_Release\zlib.lib"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="DebugDLL|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
Description="copy expat dll"
|
||||||
|
CommandLine="copy/y ..\..\..\expat-2.0.1\win32\bin\debug\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;EXV_HAVE_DLL"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
Description="copy the dlls"
|
||||||
|
CommandLine="copy/y ..\exiv2lib\$(ConfigurationName)\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:LIBCMTD"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\release\libexpat.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_DLL_Debug\zlib1d.lib"
|
||||||
|
OutputFile="$(OutDir)/mmap-test.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/mmap-test.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="ReleaseDLL|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
Description="copy expat dll"
|
||||||
|
CommandLine="copy/y ..\..\..\expat-2.0.1\win32\bin\release\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_NDEBUG;_CONSOLE;EXV_HAVE_DLL"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
Description="copy the dlls"
|
||||||
|
CommandLine="copy/y ..\exiv2lib\$(ConfigurationName)\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:LIBCMT"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\debug\libexpat.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_DLL_Release\zlib1.lib"
|
||||||
|
OutputFile="$(OutDir)/mmap-test.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/mmap-test.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\samples\mmap-test.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,196 @@
|
|||||||
|
/*
|
||||||
|
This file is part of the KDE libraries
|
||||||
|
Copyright (c) 2006 Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
||||||
|
|
||||||
|
These sources are based on ftp://g.oswego.edu/pub/misc/malloc.c
|
||||||
|
file by Doug Lea, released to the public domain.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License version 2 as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <winposix_export.h>
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <io.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
#ifndef SECTION_MAP_EXECUTE_EXPLICIT
|
||||||
|
//not defined in the February 2003 version of the Platform SDK
|
||||||
|
#define SECTION_MAP_EXECUTE_EXPLICIT 0x0020
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef FILE_MAP_EXECUTE
|
||||||
|
//not defined in the February 2003 version of the Platform SDK
|
||||||
|
#define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MUNMAP_FAILURE (-1)
|
||||||
|
|
||||||
|
#define USE_MALLOC_LOCK 1
|
||||||
|
|
||||||
|
struct mmapInfos {
|
||||||
|
HANDLE hFile; // the duplicated fd
|
||||||
|
HANDLE hMap; // handle returned by CreateFileMapping
|
||||||
|
void* start; // ptr returned by MapViewOfFile
|
||||||
|
};
|
||||||
|
|
||||||
|
CRITICAL_SECTION cs;
|
||||||
|
|
||||||
|
// rmills - only change is to add long to the following 2 lines
|
||||||
|
static long g_curMMapInfos = 0;
|
||||||
|
static long g_maxMMapInfos = -1;
|
||||||
|
static struct mmapInfos *g_mmapInfos = NULL;
|
||||||
|
#define NEW_MMAP_STRUCT_CNT 10
|
||||||
|
|
||||||
|
static int mapProtFlags(int flags, DWORD *dwAccess)
|
||||||
|
{
|
||||||
|
if ( ( flags & PROT_READ ) == PROT_READ ) {
|
||||||
|
if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
|
||||||
|
*dwAccess = FILE_MAP_WRITE;
|
||||||
|
if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
|
||||||
|
return PAGE_EXECUTE_READWRITE;
|
||||||
|
}
|
||||||
|
return PAGE_READWRITE;
|
||||||
|
}
|
||||||
|
if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
|
||||||
|
*dwAccess = FILE_MAP_EXECUTE;
|
||||||
|
return PAGE_EXECUTE_READ;
|
||||||
|
}
|
||||||
|
*dwAccess = FILE_MAP_READ;
|
||||||
|
return PAGE_READONLY;
|
||||||
|
}
|
||||||
|
if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
|
||||||
|
*dwAccess = FILE_MAP_COPY;
|
||||||
|
return PAGE_WRITECOPY;
|
||||||
|
}
|
||||||
|
if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
|
||||||
|
*dwAccess = FILE_MAP_EXECUTE;
|
||||||
|
return PAGE_EXECUTE_READ;
|
||||||
|
}
|
||||||
|
*dwAccess = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *mmap(void *start, size_t length, int prot , int flags, int fd, off_t offset)
|
||||||
|
{
|
||||||
|
struct mmapInfos mmi;
|
||||||
|
DWORD dwAccess;
|
||||||
|
DWORD flProtect;
|
||||||
|
HANDLE hfd;
|
||||||
|
|
||||||
|
if ( g_maxMMapInfos == -1 ) {
|
||||||
|
g_maxMMapInfos = 0;
|
||||||
|
InitializeCriticalSection( &cs );
|
||||||
|
}
|
||||||
|
|
||||||
|
flProtect = mapProtFlags( flags, &dwAccess );
|
||||||
|
if ( flProtect == 0 ) {
|
||||||
|
_set_errno( EINVAL );
|
||||||
|
return MAP_FAILED;
|
||||||
|
}
|
||||||
|
// we don't support this atm
|
||||||
|
if ( prot == MAP_FIXED ) {
|
||||||
|
_set_errno( ENOTSUP );
|
||||||
|
return MAP_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( fd == -1 ) {
|
||||||
|
_set_errno( EBADF );
|
||||||
|
return MAP_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
hfd = (HANDLE)_get_osfhandle( fd );
|
||||||
|
if ( hfd == INVALID_HANDLE_VALUE )
|
||||||
|
return MAP_FAILED;
|
||||||
|
|
||||||
|
if ( !DuplicateHandle( GetCurrentProcess(), hfd, GetCurrentProcess(),
|
||||||
|
&mmi.hFile, 0, FALSE, DUPLICATE_SAME_ACCESS ) ) {
|
||||||
|
#ifdef _DEBUG
|
||||||
|
DWORD dwLastErr = GetLastError();
|
||||||
|
#endif
|
||||||
|
return MAP_FAILED;
|
||||||
|
}
|
||||||
|
mmi.hMap = CreateFileMapping( mmi.hFile, NULL, flProtect,
|
||||||
|
0, length, NULL );
|
||||||
|
if ( mmi.hMap == 0 ) {
|
||||||
|
_set_errno( EACCES );
|
||||||
|
return MAP_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
mmi.start = MapViewOfFile( mmi.hMap, dwAccess, 0, offset, 0 );
|
||||||
|
if ( mmi.start == 0 ) {
|
||||||
|
DWORD dwLastErr = GetLastError();
|
||||||
|
if ( dwLastErr == ERROR_MAPPED_ALIGNMENT )
|
||||||
|
_set_errno( EINVAL );
|
||||||
|
else
|
||||||
|
_set_errno( EACCES );
|
||||||
|
return MAP_FAILED;
|
||||||
|
}
|
||||||
|
EnterCriticalSection( &cs );
|
||||||
|
if ( g_mmapInfos == NULL ) {
|
||||||
|
g_maxMMapInfos = NEW_MMAP_STRUCT_CNT;
|
||||||
|
g_mmapInfos = ( struct mmapInfos* )calloc( g_maxMMapInfos,
|
||||||
|
sizeof( struct mmapInfos ) );
|
||||||
|
}
|
||||||
|
if( g_curMMapInfos == g_maxMMapInfos) {
|
||||||
|
g_maxMMapInfos += NEW_MMAP_STRUCT_CNT;
|
||||||
|
g_mmapInfos = ( struct mmapInfos* )realloc( g_mmapInfos,
|
||||||
|
g_maxMMapInfos * sizeof( struct mmapInfos ) );
|
||||||
|
}
|
||||||
|
memcpy( &g_mmapInfos[g_curMMapInfos], &mmi, sizeof( struct mmapInfos) );
|
||||||
|
g_curMMapInfos++;
|
||||||
|
|
||||||
|
LeaveCriticalSection( &cs );
|
||||||
|
|
||||||
|
return mmi.start;
|
||||||
|
}
|
||||||
|
|
||||||
|
int munmap(void *start, size_t length)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
|
||||||
|
for( i = 0; i < g_curMMapInfos; i++ ) {
|
||||||
|
if( g_mmapInfos[i].start == start )
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( i == g_curMMapInfos ) {
|
||||||
|
_set_errno( EINVAL );
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
UnmapViewOfFile( g_mmapInfos[i].start );
|
||||||
|
CloseHandle( g_mmapInfos[i].hMap );
|
||||||
|
CloseHandle( g_mmapInfos[i].hFile );
|
||||||
|
|
||||||
|
EnterCriticalSection( &cs );
|
||||||
|
for( j = i + 1; j < g_curMMapInfos; j++ ) {
|
||||||
|
memcpy( &g_mmapInfos[ j - 1 ], &g_mmapInfos[ j ],
|
||||||
|
sizeof( struct mmapInfos ) );
|
||||||
|
}
|
||||||
|
g_curMMapInfos--;
|
||||||
|
|
||||||
|
if( g_curMMapInfos == 0 ) {
|
||||||
|
free( g_mmapInfos );
|
||||||
|
g_mmapInfos = NULL;
|
||||||
|
g_maxMMapInfos = 0;
|
||||||
|
}
|
||||||
|
LeaveCriticalSection( &cs );
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Binary file not shown.
@ -0,0 +1,399 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.10"
|
||||||
|
Name="tiff-test"
|
||||||
|
ProjectGUID="{2F4235D0-B5F5-4C59-981D-BA006734B56E}"
|
||||||
|
RootNamespace="tiff-test"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="Debug"
|
||||||
|
IntermediateDirectory="Debug"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine=""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:MSVCRTD"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\debug\libexpatMT.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_LIB_Debug\zlibd.lib"
|
||||||
|
OutputFile="$(OutDir)/tiff-test.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories=""
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/tiff-test.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="Release"
|
||||||
|
IntermediateDirectory="Release"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine=""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_NDEBUG;_CONSOLE"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:MSVCRT"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\release\libexpatMT.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_LIB_Release\zlib.lib"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="DebugDLL|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
Description="copy expat dll"
|
||||||
|
CommandLine="copy/y ..\..\..\expat-2.0.1\win32\bin\debug\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;EXV_HAVE_DLL"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
Description="copy the dlls"
|
||||||
|
CommandLine="copy/y ..\exiv2lib\$(ConfigurationName)\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:LIBCMTD"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\release\libexpat.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_DLL_Debug\zlib1d.lib"
|
||||||
|
OutputFile="$(OutDir)/tiff-test.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/tiff-test.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="ReleaseDLL|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
Description="copy expat dll"
|
||||||
|
CommandLine="copy/y ..\..\..\expat-2.0.1\win32\bin\release\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="../include;../include/exiv2;../../xmpsdk/include;../../xmpsdk/src;../../../expat-2.0.1/lib;../../../zlib-1.2.3;"
|
||||||
|
PreprocessorDefinitions="WIN32;_NDEBUG;_CONSOLE;EXV_HAVE_DLL"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="1"
|
||||||
|
WarningLevel="3"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
Description="copy the dlls"
|
||||||
|
CommandLine="copy/y ..\exiv2lib\$(ConfigurationName)\*.dll "$(TargetDir)""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
LinkLibraryDependencies="true"
|
||||||
|
AdditionalOptions="/NODEFAULTLIB:LIBCMT"
|
||||||
|
AdditionalDependencies="..\exiv2lib\$(ConfigurationName)\exiv2.lib ..\..\..\expat-2.0.1\win32\bin\debug\libexpat.lib ..\xmpsdk\$(ConfigurationName)\xmpsdk.lib ..\..\..\zlib-1.2.3\projects\visualc6\Win32_DLL_Release\zlib1.lib"
|
||||||
|
OutputFile="$(OutDir)/tiff-test.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/tiff-test.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="copy target to bin"
|
||||||
|
CommandLine="copy/y "$(TargetPath)" "$(SolutionDir)\bin\$(ConfigurationName)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\samples\tiff-test.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
@ -0,0 +1,52 @@
|
|||||||
|
# CMake build system for exiv2 library and executables
|
||||||
|
# Copyright 2008 by Patrick Spendrin <ps_ml@gmx.de>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
# 3. The name of the author may not be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior
|
||||||
|
# written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||||
|
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
set( SAMPLES addmoddel.cpp
|
||||||
|
exifcomment.cpp
|
||||||
|
exifdata-test.cpp
|
||||||
|
exifprint.cpp
|
||||||
|
iotest.cpp
|
||||||
|
iptceasy.cpp
|
||||||
|
iptcprint.cpp
|
||||||
|
iptctest.cpp
|
||||||
|
key-test.cpp
|
||||||
|
largeiptc-test.cpp
|
||||||
|
write-test.cpp
|
||||||
|
write2-test.cpp
|
||||||
|
xmpparse.cpp
|
||||||
|
xmpparser-test.cpp
|
||||||
|
xmpsample.cpp )
|
||||||
|
|
||||||
|
foreach(entry ${SAMPLES})
|
||||||
|
STRING( REPLACE ".cpp" "" target ${entry})
|
||||||
|
add_executable( ${target} ${target}.cpp )
|
||||||
|
add_test( ${target}_test ${target} )
|
||||||
|
target_link_libraries(${target} exiv2 )
|
||||||
|
endforeach(entry ${SAMPLES})
|
@ -0,0 +1,43 @@
|
|||||||
|
// ***************************************************************** -*- C++ -*-
|
||||||
|
// mmap-test.cpp, $Rev$
|
||||||
|
// Simple mmap tests
|
||||||
|
|
||||||
|
#include <exiv2/basicio.hpp>
|
||||||
|
#include <exiv2/error.hpp>
|
||||||
|
#include <exiv2/futils.hpp>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
using namespace Exiv2;
|
||||||
|
|
||||||
|
int main(int argc, char* const argv[])
|
||||||
|
try {
|
||||||
|
if (argc != 2) {
|
||||||
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
const char* path = argv[1];
|
||||||
|
|
||||||
|
FileIo file(path);
|
||||||
|
// Open the file in read mode
|
||||||
|
if (file.open("rb") != 0) {
|
||||||
|
throw Error(10, path, "rb", strError());
|
||||||
|
}
|
||||||
|
// Map it to memory
|
||||||
|
const byte* pData = file.mmap();
|
||||||
|
long size = file.size();
|
||||||
|
DataBuf buf(size);
|
||||||
|
// Read from the memory mapped region
|
||||||
|
memcpy(buf.pData_, pData, buf.size_);
|
||||||
|
// Reopen file in write mode and write to it
|
||||||
|
file.write(buf.pData_, buf.size_);
|
||||||
|
// Read from the mapped region again
|
||||||
|
memcpy(buf.pData_, pData, buf.size_);
|
||||||
|
file.close();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (const AnyError& e) {
|
||||||
|
std::cout << e << "\n";
|
||||||
|
}
|
@ -0,0 +1,224 @@
|
|||||||
|
# CMake build system for exiv2 library and executables
|
||||||
|
# Copyright 2008 by Patrick Spendrin <ps_ml@gmx.de>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
# 3. The name of the author may not be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior
|
||||||
|
# written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||||
|
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
# Private headers which are only needed for the library itself
|
||||||
|
set( LIBEXIV2_PRIVATE_HDR cr2image_int.hpp
|
||||||
|
crwimage_int.hpp
|
||||||
|
makernote_int.hpp
|
||||||
|
orfimage_int.hpp
|
||||||
|
pngchunk_int.hpp
|
||||||
|
rw2image_int.hpp
|
||||||
|
tiffcomposite_int.hpp
|
||||||
|
tifffwd_int.hpp
|
||||||
|
tiffimage_int.hpp
|
||||||
|
tiffvisitor_int.hpp
|
||||||
|
)
|
||||||
|
# Add standalone C++ header files to this list
|
||||||
|
set( LIBEXIV2_HDR basicio.hpp
|
||||||
|
bmpimage.hpp
|
||||||
|
canonmn.hpp
|
||||||
|
convert.hpp
|
||||||
|
cr2image.hpp
|
||||||
|
crwimage.hpp
|
||||||
|
datasets.hpp
|
||||||
|
easyaccess.hpp
|
||||||
|
error.hpp
|
||||||
|
exif.hpp
|
||||||
|
fujimn.hpp
|
||||||
|
futils.hpp
|
||||||
|
gifimage.hpp
|
||||||
|
image.hpp
|
||||||
|
iptc.hpp
|
||||||
|
jp2image.hpp
|
||||||
|
jpgimage.hpp
|
||||||
|
metadatum.hpp
|
||||||
|
minoltamn.hpp
|
||||||
|
mn.hpp
|
||||||
|
mrwimage.hpp
|
||||||
|
nikonmn.hpp
|
||||||
|
olympusmn.hpp
|
||||||
|
orfimage.hpp
|
||||||
|
panasonicmn.hpp
|
||||||
|
pentaxmn.hpp
|
||||||
|
pgfimage.hpp
|
||||||
|
pngimage.hpp
|
||||||
|
preview.hpp
|
||||||
|
properties.hpp
|
||||||
|
psdimage.hpp
|
||||||
|
rafimage.hpp
|
||||||
|
rcsid.hpp
|
||||||
|
rw2image.hpp
|
||||||
|
sigmamn.hpp
|
||||||
|
sonymn.hpp
|
||||||
|
tags.hpp
|
||||||
|
tgaimage.hpp
|
||||||
|
tiffimage.hpp
|
||||||
|
types.hpp
|
||||||
|
value.hpp
|
||||||
|
version.hpp
|
||||||
|
xmp.hpp
|
||||||
|
xmpsidecar.hpp )
|
||||||
|
|
||||||
|
# Add library C++ source files to this list
|
||||||
|
set( LIBEXIV2_SRC basicio.cpp
|
||||||
|
bmpimage.cpp
|
||||||
|
canonmn.cpp
|
||||||
|
convert.cpp
|
||||||
|
cr2image.cpp
|
||||||
|
crwedit.cpp
|
||||||
|
crwimage.cpp
|
||||||
|
datasets.cpp
|
||||||
|
easyaccess.cpp
|
||||||
|
error.cpp
|
||||||
|
exif.cpp
|
||||||
|
futils.cpp
|
||||||
|
fujimn.cpp
|
||||||
|
gifimage.cpp
|
||||||
|
image.cpp
|
||||||
|
iptc.cpp
|
||||||
|
jp2image.cpp
|
||||||
|
jpgimage.cpp
|
||||||
|
makernote.cpp
|
||||||
|
metadatum.cpp
|
||||||
|
minoltamn.cpp
|
||||||
|
mrwimage.cpp
|
||||||
|
nikonmn.cpp
|
||||||
|
olympusmn.cpp
|
||||||
|
orfimage.cpp
|
||||||
|
panasonicmn.cpp
|
||||||
|
pentaxmn.cpp
|
||||||
|
pgfimage.cpp
|
||||||
|
preview.cpp
|
||||||
|
properties.cpp
|
||||||
|
psdimage.cpp
|
||||||
|
rafimage.cpp
|
||||||
|
rw2image.cpp
|
||||||
|
sigmamn.cpp
|
||||||
|
sonymn.cpp
|
||||||
|
tags.cpp
|
||||||
|
tgaimage.cpp
|
||||||
|
tiffcomposite.cpp
|
||||||
|
tiffimage.cpp
|
||||||
|
tiffvisitor.cpp
|
||||||
|
types.cpp
|
||||||
|
value.cpp
|
||||||
|
version.cpp
|
||||||
|
xmp.cpp
|
||||||
|
xmpsidecar.cpp )
|
||||||
|
|
||||||
|
# Add source files of simple applications to this list
|
||||||
|
set( TAGLIST_SRC taglist.cpp )
|
||||||
|
|
||||||
|
# Source files for the Exiv2 application
|
||||||
|
set( EXIV2_SRC exiv2.cpp
|
||||||
|
actions.cpp
|
||||||
|
utils.cpp )
|
||||||
|
|
||||||
|
# Source files for the metacopy sample application
|
||||||
|
set( MC_SRC metacopy.cpp
|
||||||
|
utils.cpp )
|
||||||
|
|
||||||
|
if( EXIV2_ENABLE_PNG )
|
||||||
|
if( ZLIB_FOUND )
|
||||||
|
set( LIBEXIV2_SRC ${LIBEXIV2_SRC} pngchunk.cpp
|
||||||
|
pngimage.cpp )
|
||||||
|
endif( ZLIB_FOUND )
|
||||||
|
endif( EXIV2_ENABLE_PNG )
|
||||||
|
|
||||||
|
if(NOT HAVE_TIMEGM )
|
||||||
|
set( LIBEXIV2_SRC ${LIBEXIV2_SRC} localtime.c )
|
||||||
|
set( EXIV2_SRC ${EXIV2_SRC} localtime.c )
|
||||||
|
endif( NOT HAVE_TIMEGM )
|
||||||
|
|
||||||
|
if( MSVC )
|
||||||
|
set( MC_SRC ${MC_SRC} getopt_win32.c )
|
||||||
|
set( EXIV2_SRC ${EXIV2_SRC} getopt_win32.c )
|
||||||
|
set( LIBEXIV2_SRC ${LIBEXIV2_SRC} getopt_win32.c )
|
||||||
|
endif( MSVC )
|
||||||
|
|
||||||
|
|
||||||
|
if( EXIV2_ENABLE_XMP )
|
||||||
|
if( NOT EXIV2_ENABLE_LIBXMP )
|
||||||
|
set( LIBEXIV2_SRC ${XMPSRC} ${LIBEXIV2_SRC} )
|
||||||
|
endif( NOT EXIV2_ENABLE_LIBXMP )
|
||||||
|
endif( EXIV2_ENABLE_XMP )
|
||||||
|
|
||||||
|
# ******************************************************************************
|
||||||
|
# Library
|
||||||
|
add_library( exiv2 ${STATIC_FLAG} ${LIBEXIV2_SRC} )
|
||||||
|
set_target_properties( exiv2 PROPERTIES VERSION ${GENERIC_LIB_VERSION}
|
||||||
|
SOVERSION ${GENERIC_LIB_SOVERSION}
|
||||||
|
DEFINE_SYMBOL EXV_BUILDING_LIB )
|
||||||
|
|
||||||
|
if( EXIV2_ENABLE_LIBXMP )
|
||||||
|
target_link_libraries( exiv2 ${XMPLIB} )
|
||||||
|
endif( EXIV2_ENABLE_LIBXMP )
|
||||||
|
target_link_libraries( exiv2 ${EXPAT_LIBRARIES} )
|
||||||
|
if( EXIV2_ENABLE_PNG )
|
||||||
|
if( ZLIB_FOUND )
|
||||||
|
target_link_libraries( exiv2 ${ZLIB_LIBRARIES} )
|
||||||
|
endif( ZLIB_FOUND )
|
||||||
|
endif( EXIV2_ENABLE_PNG )
|
||||||
|
if( EXIV2_ENABLE_NLS )
|
||||||
|
target_link_libraries( exiv2 ${LIBINTL_LIBRARIES} )
|
||||||
|
endif( EXIV2_ENABLE_NLS )
|
||||||
|
if( ICONV_TEST )
|
||||||
|
target_link_libraries( exiv2 ${ICONV_LIBRARIES} )
|
||||||
|
message ( "----------------> ICONV_LIBRARIES : " ${ICONV_LIBRARIES} )
|
||||||
|
endif( ICONV_TEST )
|
||||||
|
|
||||||
|
install( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )
|
||||||
|
|
||||||
|
# ******************************************************************************
|
||||||
|
# Binary
|
||||||
|
add_executable( exiv2bin ${EXIV2_SRC} )
|
||||||
|
set_target_properties( exiv2bin PROPERTIES OUTPUT_NAME exiv2 )
|
||||||
|
target_link_libraries( exiv2bin exiv2 )
|
||||||
|
install( TARGETS exiv2bin ${INSTALL_TARGET_STANDARD_ARGS} )
|
||||||
|
|
||||||
|
# ******************************************************************************
|
||||||
|
# Binary
|
||||||
|
add_executable( metacopy ${MC_SRC} )
|
||||||
|
target_link_libraries( metacopy exiv2 )
|
||||||
|
install( TARGETS metacopy ${INSTALL_TARGET_STANDARD_ARGS} )
|
||||||
|
|
||||||
|
|
||||||
|
# ******************************************************************************
|
||||||
|
# Binary
|
||||||
|
add_executable( taglist ${TAGLIST_SRC} )
|
||||||
|
target_link_libraries( taglist exiv2 )
|
||||||
|
install( TARGETS taglist ${INSTALL_TARGET_STANDARD_ARGS} )
|
||||||
|
|
||||||
|
# ******************************************************************************
|
||||||
|
# Headers
|
||||||
|
install( FILES ${LIBEXIV2_HDR} DESTINATION include/exiv2 )
|
||||||
|
|
||||||
|
# ******************************************************************************
|
||||||
|
# Man page
|
||||||
|
install( FILES exiv2.1 DESTINATION man/man1 )
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,331 @@
|
|||||||
|
// ***************************************************************** -*- C++ -*-
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2004-2009 Andreas Huggel <ahuggel@gmx.net>
|
||||||
|
*
|
||||||
|
* This program is part of the Exiv2 distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
File: pgfimage.cpp
|
||||||
|
Version: $Rev$
|
||||||
|
Author(s): Gilles Caulier (cgilles) <caulier dot gilles at gmail dot com>
|
||||||
|
History: 16-Jun-09, gc: submitted
|
||||||
|
Credits: See header file
|
||||||
|
*/
|
||||||
|
// *****************************************************************************
|
||||||
|
#include "rcsid.hpp"
|
||||||
|
EXIV2_RCSID("@(#) $Id$")
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
|
||||||
|
#define DEBUG 1
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
// included header files
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# include "exv_msvc.h"
|
||||||
|
#else
|
||||||
|
# include "exv_conf.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "pgfimage.hpp"
|
||||||
|
#include "image.hpp"
|
||||||
|
#include "pngimage.hpp"
|
||||||
|
#include "basicio.hpp"
|
||||||
|
#include "error.hpp"
|
||||||
|
#include "futils.hpp"
|
||||||
|
|
||||||
|
// + standard includes
|
||||||
|
#include <string>
|
||||||
|
#include <cstring>
|
||||||
|
#include <iostream>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
// Signature from front of PGF file
|
||||||
|
const unsigned char pgfSignature[3] = { 0x50, 0x47, 0x46 };
|
||||||
|
|
||||||
|
const unsigned char pgfBlank[] = { 0x50,0x47,0x46,0x36,0x10,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x18,0x03,0x03,0x00,0x00,0x00,0x14,0x00,0x67,0x08,0x20,0x00,0xc0,0x01,
|
||||||
|
0x00,0x00,0x37,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x37,0x00,
|
||||||
|
0x00,0x78,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x37,0x00,0x00,0x78,0x00,0x00,
|
||||||
|
0x00,0x00,0x01,0x00,0x00,0x00,0x37,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x01,0x00,
|
||||||
|
0x00,0x00,0x37,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x37,0x00,
|
||||||
|
0x00,0x78,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
// class member definitions
|
||||||
|
namespace Exiv2 {
|
||||||
|
|
||||||
|
PgfImage::PgfImage(BasicIo::AutoPtr io, bool create)
|
||||||
|
: Image(ImageType::pgf, mdExif | mdIptc| mdXmp | mdComment, io)
|
||||||
|
{
|
||||||
|
if (create)
|
||||||
|
{
|
||||||
|
if (io_->open() == 0)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
std::cerr << "Exiv2::PgfImage:: Creating PGF image to memory\n";
|
||||||
|
#endif
|
||||||
|
IoCloser closer(*io_);
|
||||||
|
if (io_->write(pgfBlank, sizeof(pgfBlank)) != sizeof(pgfBlank))
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
std::cerr << "Exiv2::PgfImage:: Failed to create PGF image on memory\n";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // PgfImage::PgfImage
|
||||||
|
|
||||||
|
void PgfImage::readMetadata()
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
std::cerr << "Exiv2::PgfImage::readMetadata: Reading PGF file " << io_->path() << "\n";
|
||||||
|
#endif
|
||||||
|
if (io_->open() != 0)
|
||||||
|
{
|
||||||
|
throw Error(9, io_->path(), strError());
|
||||||
|
}
|
||||||
|
IoCloser closer(*io_);
|
||||||
|
// Ensure that this is the correct image type
|
||||||
|
if (!isPgfType(*io_, true))
|
||||||
|
{
|
||||||
|
if (io_->error() || io_->eof()) throw Error(14);
|
||||||
|
throw Error(3, "PGF");
|
||||||
|
}
|
||||||
|
clearMetadata();
|
||||||
|
|
||||||
|
readPgfMagicNumber(*io_);
|
||||||
|
|
||||||
|
uint32_t headerSize = readPgfHeaderSize(*io_);
|
||||||
|
|
||||||
|
readPgfHeaderStructure(*io_, &pixelWidth_, &pixelHeight_);
|
||||||
|
|
||||||
|
// And now, the most interresting, the user data byte array where metadata are stored as small image.
|
||||||
|
|
||||||
|
long size = 8 + headerSize - io_->tell();
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
std::cout << "Exiv2::PgfImage::readMetadata: Found Image data (" << size << " bytes)\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (size < 0) throw Error(20);
|
||||||
|
if (size == 0) return;
|
||||||
|
|
||||||
|
DataBuf imgData(size);
|
||||||
|
std::memset(imgData.pData_, 0x0, imgData.size_);
|
||||||
|
long bufRead = io_->read(imgData.pData_, imgData.size_);
|
||||||
|
if (io_->error()) throw Error(14);
|
||||||
|
if (bufRead != imgData.size_) throw Error(20);
|
||||||
|
|
||||||
|
Image::AutoPtr image = Exiv2::ImageFactory::open(imgData.pData_, imgData.size_);
|
||||||
|
image->readMetadata();
|
||||||
|
exifData() = image->exifData();
|
||||||
|
iptcData() = image->iptcData();
|
||||||
|
xmpData() = image->xmpData();
|
||||||
|
|
||||||
|
} // PgfImage::readMetadata
|
||||||
|
|
||||||
|
void PgfImage::writeMetadata()
|
||||||
|
{
|
||||||
|
if (io_->open() != 0)
|
||||||
|
{
|
||||||
|
throw Error(9, io_->path(), strError());
|
||||||
|
}
|
||||||
|
IoCloser closer(*io_);
|
||||||
|
BasicIo::AutoPtr tempIo(io_->temporary()); // may throw
|
||||||
|
assert (tempIo.get() != 0);
|
||||||
|
|
||||||
|
doWriteMetadata(*tempIo); // may throw
|
||||||
|
io_->close();
|
||||||
|
io_->transfer(*tempIo); // may throw
|
||||||
|
|
||||||
|
} // PgfImage::writeMetadata
|
||||||
|
|
||||||
|
void PgfImage::doWriteMetadata(BasicIo& outIo)
|
||||||
|
{
|
||||||
|
if (!io_->isopen()) throw Error(20);
|
||||||
|
if (!outIo.isopen()) throw Error(21);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
std::cout << "Exiv2::PgfImage::doWriteMetadata: Writing PGF file " << io_->path() << "\n";
|
||||||
|
std::cout << "Exiv2::PgfImage::doWriteMetadata: tmp file created " << outIo.path() << "\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Ensure that this is the correct image type
|
||||||
|
if (!isPgfType(*io_, true))
|
||||||
|
{
|
||||||
|
if (io_->error() || io_->eof()) throw Error(20);
|
||||||
|
throw Error(22);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure PGF version.
|
||||||
|
byte mnb = readPgfMagicNumber(*io_);
|
||||||
|
|
||||||
|
readPgfHeaderSize(*io_);
|
||||||
|
|
||||||
|
int w, h;
|
||||||
|
DataBuf header = readPgfHeaderStructure(*io_, &w, &h);
|
||||||
|
|
||||||
|
Image::AutoPtr img = ImageFactory::create(ImageType::png);
|
||||||
|
|
||||||
|
img->setExifData(exifData_);
|
||||||
|
img->setIptcData(iptcData_);
|
||||||
|
img->setXmpData(xmpData_);
|
||||||
|
img->writeMetadata();
|
||||||
|
int imgSize = img->io().size();
|
||||||
|
DataBuf imgBuf = img->io().read(imgSize);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
std::cout << "Exiv2::PgfImage::doWriteMetadata: Creating image to host metadata (" << imgSize << " bytes)\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//---------------------------------------------------------------
|
||||||
|
|
||||||
|
// Write PGF Signature.
|
||||||
|
if (outIo.write(pgfSignature, 3) != 3) throw Error(21);
|
||||||
|
|
||||||
|
// Write Magic number.
|
||||||
|
if (outIo.putb(mnb) == EOF) throw Error(21);
|
||||||
|
|
||||||
|
// Write new Header size.
|
||||||
|
uint32_t newHeaderSize = header.size_ + imgSize;
|
||||||
|
DataBuf buffer(4);
|
||||||
|
memcpy (buffer.pData_, &newHeaderSize, 4);
|
||||||
|
if (outIo.write(buffer.pData_, 4) != 4) throw Error(21);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
std::cout << "Exiv2::PgfImage: new PGF header size : " << newHeaderSize << " bytes\n";
|
||||||
|
|
||||||
|
printf("%x\n", buffer.pData_[0]);
|
||||||
|
printf("%x\n", buffer.pData_[1]);
|
||||||
|
printf("%x\n", buffer.pData_[2]);
|
||||||
|
printf("%x\n", buffer.pData_[3]);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Write Header data.
|
||||||
|
if (outIo.write(header.pData_, header.size_) != header.size_) throw Error(21);
|
||||||
|
|
||||||
|
// Write new metadata byte array.
|
||||||
|
if (outIo.write(imgBuf.pData_, imgBuf.size_) != imgBuf.size_) throw Error(21);
|
||||||
|
|
||||||
|
// Copy the rest of PGF image data.
|
||||||
|
|
||||||
|
DataBuf buf(4096);
|
||||||
|
long readSize = 0;
|
||||||
|
while ((readSize=io_->read(buf.pData_, buf.size_)))
|
||||||
|
{
|
||||||
|
if (outIo.write(buf.pData_, readSize) != readSize) throw Error(21);
|
||||||
|
}
|
||||||
|
if (outIo.error()) throw Error(21);
|
||||||
|
|
||||||
|
} // PgfImage::doWriteMetadata
|
||||||
|
|
||||||
|
byte PgfImage::readPgfMagicNumber(BasicIo& iIo)
|
||||||
|
{
|
||||||
|
byte b = iIo.getb();
|
||||||
|
if (iIo.error()) throw Error(14);
|
||||||
|
|
||||||
|
if (b < 0x36) // 0x36 = '6'.
|
||||||
|
{
|
||||||
|
// Not right Magick version.
|
||||||
|
#ifdef DEBUG
|
||||||
|
std::cout << "Exiv2::PgfImage::readMetadata: wrong Magick number\n";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return b;
|
||||||
|
} // PgfImage::readPgfMagicNumber
|
||||||
|
|
||||||
|
uint32_t PgfImage::readPgfHeaderSize(BasicIo& iIo)
|
||||||
|
{
|
||||||
|
DataBuf buffer(4);
|
||||||
|
long bufRead = iIo.read(buffer.pData_, buffer.size_);
|
||||||
|
if (iIo.error()) throw Error(14);
|
||||||
|
if (bufRead != buffer.size_) throw Error(20);
|
||||||
|
|
||||||
|
uint32_t headerSize = 0;
|
||||||
|
memcpy (&headerSize, buffer.pData_, 4); // TODO : check endianness.
|
||||||
|
if (headerSize <= 0 ) throw Error(22);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
std::cout << "Exiv2::PgfImage: PGF header size : " << headerSize << " bytes\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return headerSize;
|
||||||
|
} // PgfImage::readPgfHeaderSize
|
||||||
|
|
||||||
|
DataBuf PgfImage::readPgfHeaderStructure(BasicIo& iIo, int* width, int* height)
|
||||||
|
{
|
||||||
|
DataBuf header(16);
|
||||||
|
long bufRead = iIo.read(header.pData_, header.size_);
|
||||||
|
if (iIo.error()) throw Error(14);
|
||||||
|
if (bufRead != header.size_) throw Error(20);
|
||||||
|
|
||||||
|
memcpy(width, &header.pData_[0], 4); // TODO : check endianness.
|
||||||
|
memcpy(height, &header.pData_[4], 4); // TODO : check endianness.
|
||||||
|
|
||||||
|
/* NOTE: properties not yet used
|
||||||
|
byte nLevels = buffer.pData_[8];
|
||||||
|
byte quality = buffer.pData_[9];
|
||||||
|
byte bpp = buffer.pData_[10];
|
||||||
|
byte channels = buffer.pData_[11];
|
||||||
|
*/
|
||||||
|
byte mode = header.pData_[12];
|
||||||
|
|
||||||
|
if (mode == 2) // Indexed color image. We pass color table (256 * 3 bytes).
|
||||||
|
{
|
||||||
|
header.alloc(16 + 256*3);
|
||||||
|
|
||||||
|
bufRead = iIo.read(&header.pData_[16], 256*3);
|
||||||
|
if (iIo.error()) throw Error(14);
|
||||||
|
if (bufRead != 256*3) throw Error(20);
|
||||||
|
}
|
||||||
|
|
||||||
|
return header;
|
||||||
|
} // PgfImage::readPgfHeaderStructure
|
||||||
|
|
||||||
|
// *************************************************************************
|
||||||
|
// free functions
|
||||||
|
Image::AutoPtr newPgfInstance(BasicIo::AutoPtr io, bool create)
|
||||||
|
{
|
||||||
|
Image::AutoPtr image(new PgfImage(io, create));
|
||||||
|
if (!image->good())
|
||||||
|
{
|
||||||
|
image.reset();
|
||||||
|
}
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isPgfType(BasicIo& iIo, bool advance)
|
||||||
|
{
|
||||||
|
const int32_t len = 3;
|
||||||
|
byte buf[len];
|
||||||
|
iIo.read(buf, len);
|
||||||
|
if (iIo.error() || iIo.eof())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int rc = memcmp(buf, pgfSignature, 3);
|
||||||
|
if (!advance || rc != 0)
|
||||||
|
{
|
||||||
|
iIo.seek(-len, BasicIo::cur);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rc == 0;
|
||||||
|
}
|
||||||
|
} // namespace Exiv2
|
@ -0,0 +1,137 @@
|
|||||||
|
// ***************************************************************** -*- C++ -*-
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2004-2009 Andreas Huggel <ahuggel@gmx.net>
|
||||||
|
*
|
||||||
|
* This program is part of the Exiv2 distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
@file pgfimage.hpp
|
||||||
|
@brief PGF image, implemented using the following references:
|
||||||
|
<a href="http://www.libpgf.org/uploads/media/PGF_stamm_wscg02.pdf">PGF specification</a> from libpgf web site<br>
|
||||||
|
@version $Rev$
|
||||||
|
@author Andreas Huggel (ahu)
|
||||||
|
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||||
|
@author Gilles Caulier (cgilles)
|
||||||
|
<a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
|
||||||
|
@date 16-Jun-09, gc: submitted
|
||||||
|
*/
|
||||||
|
#ifndef PGFIMAGE_HPP_
|
||||||
|
#define PGFIMAGE_HPP_
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
// included header files
|
||||||
|
#include "image.hpp"
|
||||||
|
#include "basicio.hpp"
|
||||||
|
#include "types.hpp"
|
||||||
|
|
||||||
|
// + standard includes
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
// namespace extensions
|
||||||
|
namespace Exiv2
|
||||||
|
{
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
// class definitions
|
||||||
|
|
||||||
|
// Add PGF to the supported image formats
|
||||||
|
namespace ImageType
|
||||||
|
{
|
||||||
|
const int pgf = 17; //!< PGF image type (see class PgfImage)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
@brief Class to access PGF images. Exif and IPTC metadata are supported
|
||||||
|
directly.
|
||||||
|
*/
|
||||||
|
class EXIV2API PgfImage : public Image {
|
||||||
|
public:
|
||||||
|
//! @name Creators
|
||||||
|
//@{
|
||||||
|
/*!
|
||||||
|
@brief Constructor that can either open an existing PGF image or create
|
||||||
|
a new image from scratch. If a new image is to be created, any
|
||||||
|
existing data is overwritten. Since the constructor can not return
|
||||||
|
a result, callers should check the good() method after object
|
||||||
|
construction to determine success or failure.
|
||||||
|
@param io An auto-pointer that owns a BasicIo instance used for
|
||||||
|
reading and writing image metadata. \b Important: The constructor
|
||||||
|
takes ownership of the passed in BasicIo instance through the
|
||||||
|
auto-pointer. Callers should not continue to use the BasicIo
|
||||||
|
instance after it is passed to this method. Use the Image::io()
|
||||||
|
method to get a temporary reference.
|
||||||
|
@param create Specifies if an existing image should be read (false)
|
||||||
|
or if a new file should be created (true).
|
||||||
|
*/
|
||||||
|
PgfImage(BasicIo::AutoPtr io, bool create);
|
||||||
|
//@}
|
||||||
|
|
||||||
|
//! @name Manipulators
|
||||||
|
//@{
|
||||||
|
void readMetadata();
|
||||||
|
void writeMetadata();
|
||||||
|
//@}
|
||||||
|
|
||||||
|
//! @name Accessors
|
||||||
|
//@{
|
||||||
|
std::string mimeType() const { return "image/pgf"; }
|
||||||
|
//@}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//! @name NOT implemented
|
||||||
|
//@{
|
||||||
|
//! Copy constructor
|
||||||
|
PgfImage(const PgfImage& rhs);
|
||||||
|
//! Assignment operator
|
||||||
|
PgfImage& operator=(const PgfImage& rhs);
|
||||||
|
/*!
|
||||||
|
@brief Provides the main implementation of writeMetadata() by
|
||||||
|
writing all buffered metadata to the provided BasicIo.
|
||||||
|
@param oIo BasicIo instance to write to (a temporary location).
|
||||||
|
|
||||||
|
@return 4 if opening or writing to the associated BasicIo fails
|
||||||
|
*/
|
||||||
|
EXV_DLLLOCAL void doWriteMetadata(BasicIo& oIo);
|
||||||
|
//! Read Magick number. Only version >= 6 is supported.
|
||||||
|
byte readPgfMagicNumber(BasicIo& iIo);
|
||||||
|
//! Read PGF Header size encoded in 32 bits integer.
|
||||||
|
uint32_t readPgfHeaderSize(BasicIo& iIo);
|
||||||
|
//! Read header structure.
|
||||||
|
DataBuf readPgfHeaderStructure(BasicIo& iIo, int* width, int* height);
|
||||||
|
//@}
|
||||||
|
|
||||||
|
}; // class PgfImage
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
// template, inline and free functions
|
||||||
|
|
||||||
|
// These could be static private functions on Image subclasses but then
|
||||||
|
// ImageFactory needs to be made a friend.
|
||||||
|
/*!
|
||||||
|
@brief Create a new PgfImage instance and return an auto-pointer to it.
|
||||||
|
Caller owns the returned object and the auto-pointer ensures that
|
||||||
|
it will be deleted.
|
||||||
|
*/
|
||||||
|
EXIV2API Image::AutoPtr newPgfInstance(BasicIo::AutoPtr io, bool create);
|
||||||
|
|
||||||
|
//! Check if the file iIo is a PGF image.
|
||||||
|
EXIV2API bool isPgfType(BasicIo& iIo, bool advance);
|
||||||
|
|
||||||
|
} // namespace Exiv2
|
||||||
|
|
||||||
|
#endif // #ifndef PGFIMAGE_HPP_
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue