From f4a37c63f2f890c16ff7192fc89a75a7c34ae82b Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sat, 11 May 2019 23:00:58 +0100 Subject: [PATCH] version.cpp Pragma removed. Platform includes simplified. cmake/packaging.cmake Changed comment about VS version numbers --- cmake/packaging.cmake | 2 +- src/version.cpp | 29 +++++++++-------------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/cmake/packaging.cmake b/cmake/packaging.cmake index be0aef09..40b946a0 100644 --- a/cmake/packaging.cmake +++ b/cmake/packaging.cmake @@ -71,7 +71,7 @@ endif() set (VS "") # VisualStudio if ( MSVC ) - # https://gitlab.kitware.com/cmake/cmake/blob/v3.10.0-rc5/Modules/Platform/Windows-MSVC.cmake#L51-68 + # VS2015 >= 1900, VS2017 >= 1910, VS2019 >= 1920 if ( MSVC_VERSION GREATER 1919 ) set(VS 2019) elseif ( MSVC_VERSION GREATER 1909 ) diff --git a/src/version.cpp b/src/version.cpp index 4f82e09e..274ca3d6 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -17,10 +17,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA. */ -/* - File: version.cpp - */ - // ***************************************************************************** #include "config.h" @@ -29,16 +25,6 @@ #include #endif -#if defined(__CYGWIN__) || defined(__MINGW__) -#include -# if __LP64__ -# ifdef _WIN64 -# undef _WIN64 -# endif -# define _WIN64 1 -# endif -#endif - #include "http.hpp" #include "version.hpp" #include "makernote_int.hpp" @@ -70,15 +56,16 @@ #define _MAX_PATH 512 #endif -// tell MSVC to link psapi. -#ifdef _MSC_VER -#pragma comment( lib, "psapi" ) -#endif - // platform specific support for getLoadedLibraries -#if defined(WIN32) +#if defined(__CYGWIN__) || defined(__MINGW__) || defined(WIN32) # include # include +# if __LP64__ +# ifdef _WIN64 +# undef _WIN64 +# endif +# define _WIN64 1 +# endif #elif defined(__APPLE__) # include #elif defined(__FreeBSD__) @@ -89,6 +76,8 @@ # include #endif + + namespace Exiv2 { int versionNumber() {