Robin Mills 7 years ago committed by Luis Díaz Más
parent b944b2ace7
commit 22e49cc78b

@ -39,7 +39,7 @@ add_library( exiv2lib_int OBJECT
unused.h unused.h
) )
add_library( exiv2lib add_library( exiv2lib
../include/exiv2/config.h ../include/exiv2/config.h
../include/exiv2/exiv2.hpp ../include/exiv2/exiv2.hpp
../include/exiv2/rwlock.hpp ../include/exiv2/rwlock.hpp
@ -195,10 +195,12 @@ if (NOT MSVC)
endif() endif()
if (CYGWIN OR MINGW OR MSYS) if (CYGWIN OR MINGW OR MSYS)
target_link_libraries( exiv2lib PRIVATE psapi ws2_32 ) target_link_libraries( exiv2lib PRIVATE psapi ws2_32 )
endif() endif()
target_link_libraries( exiv2lib PRIVATE Threads::Threads) target_link_libraries( exiv2lib PRIVATE Threads::Threads)
else()
target_link_libraries( exiv2lib PRIVATE psapi ws2_32 )
endif() endif()
if( EXIV2_ENABLE_PNG ) if( EXIV2_ENABLE_PNG )
@ -223,7 +225,7 @@ install(TARGETS exiv2lib EXPORT exiv2Config
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
) )
install(DIRECTORY ../include/exiv2 install(DIRECTORY ../include/exiv2
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h*") FILES_MATCHING PATTERN "*.h*")
@ -238,7 +240,7 @@ install(EXPORT exiv2Config DESTINATION "share/exiv2/cmake")
# exiv2 application # exiv2 application
if(EXIV2_BUILD_EXIV2_COMMAND) if(EXIV2_BUILD_EXIV2_COMMAND)
add_executable( exiv2 add_executable( exiv2
exiv2.cpp exiv2.cpp
exiv2app.hpp exiv2app.hpp
actions.cpp actions.hpp actions.cpp actions.hpp

@ -464,14 +464,8 @@ namespace Exiv2 {
{ {
std::string ret("unknown"); std::string ret("unknown");
#if defined(WIN32) #if defined(WIN32)
HANDLE processHandle = NULL; if ( GetModuleFileName( "", filename, MAX_PATH ) != 0 ) {
processHandle = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, GetCurrentProcessId()); ret = filename;
if (processHandle != NULL) {
TCHAR filename[MAX_PATH];
if (GetModuleFileNameEx(processHandle, NULL, filename, MAX_PATH) != 0) {
ret = filename;
}
CloseHandle(processHandle);
} }
#elif defined(__APPLE__) #elif defined(__APPLE__)
const int pid = getpid(); const int pid = getpid();

Loading…
Cancel
Save