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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:43:26 UTC 2017


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

The following commit has been merged in the master branch:
commit 4863c239c250a834a17df67bc5c0b8bece71b106
Author: Robin Mills <robin at clanmills.com>
Date:   Sun Oct 7 16:45:22 2012 +0000

    Fix.  Issue: #856. Refactoring msvc/CMake code. Thanks to Daniel for this patch.
---
 CMakeLists.txt         | 18 ++++--------------
 samples/CMakeLists.txt |  2 ++
 src/CMakeLists.txt     | 37 ++++++++++++++-----------------------
 3 files changed, 20 insertions(+), 37 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8509900..1f8fb58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,25 +72,15 @@ if( MSVC )
 	
     # link dependent libraries
     if ( NOT EXPAT_LIBRARY  )
-    	if (OUT_OF_SOURCE)
-    		set(EXPAT_LIBRARY      ../../../${E}/$(ConfigurationName)/expat)
-    		set(EXPAT_INCLUDE_DIR  ../${E}/lib)
-		else()
-    		set(EXPAT_LIBRARY      ../../${E}/$(ConfigurationName)/expat)
-    		set(EXPAT_INCLUDE_DIR  ../${E}/lib)
-    	endif()
+        set(EXPAT_LIBRARY      ${CMAKE_SOURCE_DIR}/../${E}/$(ConfigurationName)/expat)
+        set(EXPAT_INCLUDE_DIR  ${CMAKE_SOURCE_DIR}/../${E}/lib)
     	include_directories( ${EXPAT_INCLUDE_DIR} msvc64\include src\include)
 	endif()
 	
 	FIND_PACKAGE(ZLIB QUIET)
     if ( NOT ZLIB_FOUND )
-        if (OUT_OF_SOURCE)
-            set(ZLIB_LIBRARY       ../../../${Z}/$(ConfigurationName)/zlib )
-            set(ZLIB_INCLUDE_DIR   ../${Z})
-        else()
-            set(ZLIB_LIBRARY       ../../${Z}/$(ConfigurationName)/zlib)
-            set(ZLIB_INCLUDE_DIR   ../${Z})
-        endif()
+        set(ZLIB_LIBRARY       ${CMAKE_SOURCE_DIR}/../${Z}/$(ConfigurationName)/zlib)
+        set(ZLIB_INCLUDE_DIR   ${CMAKE_SOURCE_DIR}/../${Z})
     endif()
     include_directories(${ZLIB_INCLUDE_DIR})
 	
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
index f1a5e36..5746dec 100644
--- a/samples/CMakeLists.txt
+++ b/samples/CMakeLists.txt
@@ -14,6 +14,8 @@ if (MSVC)
 	#	link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../zlib-1.2.7/$(ConfigurationName))
 	endif()
 endif()
+include_directories("${CMAKE_SOURCE_DIR}/include")
+
 
 SET( SAMPLES addmoddel.cpp
              convert-test.cpp
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 66bdd11..a4bdbfa 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -256,29 +256,20 @@ ENDIF()
 ##
 # copy zlib and expat dlls to output directory (TODO: rewrite for NMake)
 IF ( MSVC AND EXIV2_ENABLE_SHARED )
-	if (OUT_OF_SOURCE) 
-	    ADD_CUSTOM_COMMAND(
-	      TARGET exiv2lib
-	      POST_BUILD
-	      COMMAND copy /y $(SolutionDir)..\..\${E}\$(ConfigurationName)\*.dll $(SolutionDir)\bin\${P_DIR}\${T_DIR}\$(ConfigurationName)
-	    )
-	    ADD_CUSTOM_COMMAND(
-	      TARGET exiv2lib
-	      POST_BUILD
-	      COMMAND copy /y $(SolutionDir)..\..\${Z}\$(ConfigurationName)\*.dll $(SolutionDir)\bin\${P_DIR}\${T_DIR}\$(ConfigurationName)
-	    )
-    else()
-	    ADD_CUSTOM_COMMAND(
-	      TARGET exiv2lib
-	      POST_BUILD
-	      COMMAND copy /y $(SolutionDir)..\${E}\$(ConfigurationName)\*.dll $(SolutionDir)\bin\${P_DIR}\${T_DIR}\$(ConfigurationName)
-	    )
-	    ADD_CUSTOM_COMMAND(
-	      TARGET exiv2lib
-	      POST_BUILD
-	      COMMAND copy /y $(SolutionDir)..\${Z}\$(ConfigurationName)\*.dll $(SolutionDir)\bin\${P_DIR}\${T_DIR}\$(ConfigurationName)
-	    )
-    endif()
+    get_filename_component(EXPAT_LIBRARY_DIR ${EXPAT_LIBRARY} PATH)
+    string(REGEX REPLACE "/" "\\" EXPAT_LIBRARY_DIR ${EXPAT_LIBRARY_DIR})
+    get_filename_component(ZLIB_LIBRARY_DIR ${ZLIB_LIBRARY} PATH)
+    string(REGEX REPLACE "/" "\\" ZLIB_LIBRARY_DIR ${ZLIB_LIBRARY_DIR})
+    ADD_CUSTOM_COMMAND(
+      TARGET exiv2lib
+      POST_BUILD
+      COMMAND copy /y ${EXPAT_LIBRARY_DIR}\*.dll $(SolutionDir)\bin\${P_DIR}\${T_DIR}\$(ConfigurationName)
+    )
+    ADD_CUSTOM_COMMAND(
+      TARGET exiv2lib
+      POST_BUILD
+      COMMAND copy /y ${ZLIB_LIBRARY_DIR}\*.dll $(SolutionDir)\bin\${P_DIR}\${T_DIR}\$(ConfigurationName)
+    )
 ENDIF()
 INSTALL( TARGETS exiv2lib ${INSTALL_TARGET_STANDARD_ARGS} )
 

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list