[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:47:25 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=be09450

The following commit has been merged in the master branch:
commit be0945016bf92f8d998832f2e17b60a3034fd78d
Author: Robin Mills <robin at clanmills.com>
Date:   Fri Mar 17 12:58:18 2017 +0000

    #1269 Thank You to Ben for reporting this and providing the patch.
---
 CMakeLists.txt         |  4 +++-
 CMake_msvc.txt         | 62 +++++++++++++++++++++++++-------------------------
 config/CMakeChecks.txt |  2 ++
 samples/CMakeLists.txt |  2 +-
 src/CMakeLists.txt     |  4 ++--
 xmpsdk/CMakeLists.txt  |  2 +-
 6 files changed, 40 insertions(+), 36 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9957421..1a70a3d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,13 +51,14 @@ OPTION( EXIV2_ENABLE_BUILD_PO      "Build translations files"
 OPTION( EXIV2_ENABLE_VIDEO         "Build video support into library"                      OFF )
 OPTION( EXIV2_ENABLE_WEBREADY      "Build webready support into library"                   OFF )
 IF (WIN32)
+    OPTION( EXIV2_ENABLE_DYNAMIC_RUNTIME  "Use dynamic runtime (used for static libs)"     OFF )
     OPTION( EXIV2_ENABLE_WIN_UNICODE   "Use Unicode paths (wstring) on Windows"            OFF )
     OPTION( EXIV2_ENABLE_CURL          "USE Libcurl for HttpIo"                            OFF )
     OPTION( EXIV2_ENABLE_SSH           "USE Libssh for SshIo"                              OFF )
 ELSE()
     OPTION( EXIV2_ENABLE_CURL          "USE Libcurl for HttpIo"                            ON  )
     OPTION( EXIV2_ENABLE_SSH           "USE Libssh for SshIo"                              ON  )
-
+    SET ( EXIV2_ENABLE_DYNAMIC_RUNTIME OFF )
 ENDIF()
 
 # set include path for FindXXX.cmake files
@@ -110,6 +111,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/ ${CMAKE_SOURCE_DIR}/include/  ${CM
 if( MSVC )
     # cmake_policy(SET CMP0008)
     ADD_DEFINITIONS(-DPSAPI_VERSION=1) # to be compatible with <= WinVista (#905)
+    set(CMAKE_DEBUG_POSTFIX "d")
 endif( MSVC )
 
 IF( EXIV2_ENABLE_XMP )
diff --git a/CMake_msvc.txt b/CMake_msvc.txt
index f44b8c6..9ffdb82 100644
--- a/CMake_msvc.txt
+++ b/CMake_msvc.txt
@@ -1,38 +1,38 @@
 #if (MSVC) 
 #	set_property(TARGET tgt PROPERTY CXX_STANDARD 11)
 #endif()
-
-##
-# msvc tuning macros
-macro(msvc_runtime_set_static_ignores bDynamic)
-  if(MSVC)
-    # don't link msvcrt for .exe which use shared libraries (use default libcmt)
-	if ( ${bDynamic} STREQUAL "OFF" )
-		set(CMAKE_EXE_LINKER_FLAGS_DEBUG          "/NODEFAULTLIB:MSVCRTD")
-		set(CMAKE_EXE_LINKER_FLAGS_RELEASE        "/NODEFAULTLIB:MSVCRT")
-		set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL     "/NODEFAULTLIB:MSVCRT")
+
+##
+# msvc tuning macros
+macro(msvc_runtime_set_static_ignores bDynamic bDynamicRuntime)
+  if(MSVC)
+    # don't link msvcrt for .exe which use shared libraries (use default libcmt)
+	if ( ${bDynamic} STREQUAL "OFF" AND ${bDynamicRuntime} STREQUAL "OFF")
+		set(CMAKE_EXE_LINKER_FLAGS_DEBUG          "/NODEFAULTLIB:MSVCRTD")
+		set(CMAKE_EXE_LINKER_FLAGS_RELEASE        "/NODEFAULTLIB:MSVCRT")
+		set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL     "/NODEFAULTLIB:MSVCRT")
 		set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/NODEFAULTLIB:MSVCRT")
 	endif()
   endif()
-endmacro()
-
-# http://stackoverflow.com/questions/10113017/setting-the-msvc-runtime-in-cmake
-macro(msvc_runtime_configure bDynamic)
-  if(MSVC)
-    set(variables
-      CMAKE_C_FLAGS_DEBUG
+endmacro()
+
+# http://stackoverflow.com/questions/10113017/setting-the-msvc-runtime-in-cmake
+macro(msvc_runtime_configure bDynamic bDynamicRuntime)
+  if(MSVC)
+    set(variables
+      CMAKE_C_FLAGS_DEBUG
       CMAKE_C_FLAGS_MINSIZEREL
       CMAKE_C_FLAGS_RELEASE
       CMAKE_C_FLAGS_RELWITHDEBINFO
       CMAKE_CXX_FLAGS_DEBUG
       CMAKE_CXX_FLAGS_MINSIZEREL
-      CMAKE_CXX_FLAGS_RELEASE
-      CMAKE_CXX_FLAGS_RELWITHDEBINFO
-    )
-    if( ${bDynamic} STREQUAL "ON" )
-      message(STATUS  "MSVC -> forcing use of dynamically-linked runtime." )
-      foreach(variable ${variables})
-        if(${variable} MATCHES "/MT")
+      CMAKE_CXX_FLAGS_RELEASE
+      CMAKE_CXX_FLAGS_RELWITHDEBINFO
+    )
+    if( ${bDynamic} STREQUAL "ON" OR ${bDynamicRuntime} STREQUAL "ON")
+      message(STATUS  "MSVC -> forcing use of dynamically-linked runtime." )
+      foreach(variable ${variables})
+        if(${variable} MATCHES "/MT")
           string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
         endif()
       endforeach()
@@ -52,13 +52,13 @@ macro(msvc_runtime_configure bDynamic)
       foreach(variable ${variables})
         if(${variable} MATCHES ${ob} )
           string(REGEX REPLACE ${ob} "" ${variable} "${${variable}}")
-        endif()
-      endforeach()
-    endforeach()
-    msvc_runtime_set_static_ignores(${bDynamic})
-  endif()
-endmacro()
-
+        endif()
+      endforeach()
+    endforeach()
+    msvc_runtime_set_static_ignores(${bDynamic} ${bDynamicRuntime})
+  endif()
+endmacro()
+
 macro(msvc_runtime_report)
   if(MSVC)
 	set(variables
diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt
index ca9068d..7792293 100644
--- a/config/CMakeChecks.txt
+++ b/config/CMakeChecks.txt
@@ -111,6 +111,7 @@ ENDIF( EXIV2_ENABLE_NLS )
 IF( EXIV2_ENABLE_WIN_UNICODE )
 	IF (WIN32)
     	SET ( UNICODE_PATH 1 )
+    	SET ( EXV_UNICODE_PATH 1 )
     ENDIF()
 ENDIF()
 
@@ -337,6 +338,7 @@ OptionOutput( "USE Libcurl for HttpIo:             " EXIV2_ENABLE_CURL
 OptionOutput( "USE Libssh for SshIo:               " EXIV2_ENABLE_SSH                )
 endif ( EXIV2_ENABLE_WEBREADY )
 IF (WIN32)
+OptionOutput( "Dynamic runtime override:           " EXIV2_ENABLE_DYNAMIC_RUNTIME    )
 OptionOutput( "Unicode paths (wstring):            " EXIV2_ENABLE_WIN_UNICODE        )
 ENDIF()
 MESSAGE( STATUS "------------------------------------------------------------------" )
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
index 979b769..9690aa0 100644
--- a/samples/CMakeLists.txt
+++ b/samples/CMakeLists.txt
@@ -42,7 +42,7 @@ SET( SAMPLES addmoddel.cpp
 ##
 # msvn tuning
 include(../CMake_msvc.txt)
-msvc_runtime_configure(${EXIV2_ENABLE_SHARED})
+msvc_runtime_configure(${EXIV2_ENABLE_SHARED} ${EXIV2_ENABLE_DYNAMIC_RUNTIME})
 
 FOREACH(entry ${SAMPLES})
     STRING( REPLACE ".cpp" "" target ${entry})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 09dff6a..0f226fd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -231,7 +231,7 @@ ENDIF( MSVC )
 # msvn tuning
 IF( MSVC )
     include(../CMake_msvc.txt)
-    msvc_runtime_configure(${EXIV2_ENABLE_SHARED})
+    msvc_runtime_configure(${EXIV2_ENABLE_SHARED} ${EXIV2_ENABLE_DYNAMIC_RUNTIME})
 ENDIF( MSVC )
 
 # ******************************************************************************
@@ -311,7 +311,7 @@ ENDIF(CYGWIN OR MINGW)
 INSTALL( TARGETS exiv2lib ${INSTALL_TARGET_STANDARD_ARGS} )
 
 include(../CMake_msvc.txt)
-msvc_runtime_configure(${EXIV2_ENABLE_SHARED})
+msvc_runtime_configure(${EXIV2_ENABLE_SHARED} ${EXIV2_ENABLE_DYNAMIC_RUNTIME})
 
 # ******************************************************************************
 # exiv2 application
diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt
index 767438c..f081d46 100644
--- a/xmpsdk/CMakeLists.txt
+++ b/xmpsdk/CMakeLists.txt
@@ -7,7 +7,7 @@
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
 include(../CMake_msvc.txt)
-msvc_runtime_configure(${EXIV2_ENABLE_SHARED})
+msvc_runtime_configure(${EXIV2_ENABLE_SHARED} ${EXIV2_ENABLE_DYNAMIC_RUNTIME})
 
 if( POLICY CMP0026 )
     cmake_policy(SET CMP0026 OLD) # Something to do with location

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list