Added cygwin support for exiv2 -v -V (verbose Version) listing of libraries loaded at run-time.

v0.27.3
Robin Mills 13 years ago
parent 755e5e8bdf
commit 7de8044ebf

@ -27,9 +27,9 @@ endif()
##
PROJECT( exiv2 )
CMAKE_MINIMUM_REQUIRED( VERSION 2.6 )
SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
CMAKE_MINIMUM_REQUIRED( VERSION 2.6 )
PROJECT( exiv2 )
SET( PACKAGE_COPYRIGHT "Andreas Huggel" )
SET( PACKAGE_BUGREPORT "ahuggel@gmx.net" )

@ -207,10 +207,10 @@ AC_SUBST(EXV_LIB_STATIC)
#
# This must happen after all other configure checks, because
# the "-no-undefined" flag is only for libtool and must not be
# passed to GCC by accident.
# passed to GCC by accident. Add link psapi (for version.cpp)
case "$host_os" in
*mingw* | *cygwin*)
LDFLAGS="$LDFLAGS -no-undefined"
LDFLAGS="$LDFLAGS -no-undefined -lpsapi"
;;
esac

@ -235,6 +235,11 @@ IF( ICONV_FOUND )
TARGET_LINK_LIBRARIES( exiv2lib ${ICONV_LIBRARIES} )
ENDIF( ICONV_FOUND )
IF (CYGWIN)
TARGET_LINK_LIBRARIES( exiv2lib psapi )
ENDIF(CYGWIN)
##
# copy header files (TODO: rewrite for NMake)
IF (MSVC )

@ -37,6 +37,10 @@ EXIV2_RCSID("@(#) $Id$")
# include "exv_conf.h"
#endif
#if defined(__CYGWIN__)
#include <windows.h>
#endif
#include "version.hpp"
// + standard includes
@ -141,7 +145,7 @@ EXIV2API void dumpLibraryInfo(std::ostream& os)
path[0]=0;
// enumerate loaded libraries and determine path to executable
#if defined(WIN32)
#if defined(WIN32) || defined(__CYGWIN__)
bReport = true;
HMODULE handles[100];
DWORD cbNeeded;
@ -189,8 +193,6 @@ EXIV2API void dumpLibraryInfo(std::ostream& os)
char proc[100];
sprintf(proc,"/proc/%d/exe", getpid());
path_l = readlink (proc, path, path_max);
#elif defined(__CYGWIN__)
bReport=true;
#endif
if ( bReport ) {

Loading…
Cancel
Save