[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:08 UTC 2017


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

The following commit has been merged in the master branch:
commit 6f769602aeba1d18dddcd61a140e6df315019db0
Author: Robin Mills <robin at clanmills.com>
Date:   Sun Jun 10 04:18:50 2012 +0000

    cmake work in progress - see README-CMAKE and TODO-CMAKE for details
---
 CMakeLists.txt     | 33 ++++++++++++++--------
 README-CMAKE       | 80 ++++++++++++++++++++++++++----------------------------
 TODO-CMAKE         |  8 ++++--
 src/CMakeLists.txt | 52 ++++++++++++++++++++++++-----------
 4 files changed, 102 insertions(+), 71 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b2015e..f853f6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,21 +49,33 @@ if( MSVC )
 	msvc_runtime_report()
 	msvc_runtime_configure(${EXIV2_ENABLE_SHARED})
 	msvc_runtime_report()
-
+	
+	set(E expat-2.1.0)
+	set(Z zlib-1.2.7)
+	
+	if( NOT IS_DIRECTORY ./../${E} )
+		set(OUT_OF_SOURCE 1)
+	endif()
+	
     if ( NOT EXPAT_LIBRARY  )
 		# link dependant libraries
-		# apologies for the duplication of information
-		# I've been unable to simply this using the 'set' command
-    	set(EXPAT_LIBRARY "../../expat-2.1.0/$(ConfigurationName)/expat")
-    	set(ZLIB_LIBRARY  "../../zlib-1.2.7/$(ConfigurationName)/zlib" )
-    	include_directories( ../zlib-1.2.7 ../expat-2.1.0/lib)
-    	set(EXPAT_INCLUDE_DIR  ../expat-2.1.0/lib )
-    	set(ZLIB_INCLUDE_DIR   ../zlib-1.2.7      )
+    	if (OUT_OF_SOURCE)
+    		set(EXPAT_LIBRARY      ../../../${E}/$(ConfigurationName)/expat)
+    		set(ZLIB_LIBRARY       ../../../${Z}/$(ConfigurationName)/zlib )
+    		set(EXPAT_INCLUDE_DIR  ../${E}/lib )
+    		set(ZLIB_INCLUDE_DIR   ../${Z}     )
+		else()
+    		set(EXPAT_LIBRARY      ../../${E}/$(ConfigurationName)/expat)
+    		set(ZLIB_LIBRARY       ../../${Z}/$(ConfigurationName)/zlib)
+    		set(EXPAT_INCLUDE_DIR  ../${E}/lib )
+    		set(ZLIB_INCLUDE_DIR   ../${Z}     )
+    	endif()
+    	include_directories( ${EXPAT_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ../msvc64/include ../../msvc64/include $(SolutionDir)\src\include)
 	endif()
 	
 	if ( EXIV2_ENABLE_SHARED )
-	    add_library(expat-2.1.0 SHARED IMPORTED)
-	    add_library(zlib-1.2.7  SHARED IMPORTED)
+	    add_library(${E} SHARED IMPORTED)
+	    add_library(${Z} SHARED IMPORTED)
 	endif()
 
 	##
@@ -86,7 +98,6 @@ if( MSVC )
     set(CMAKE_CURRENT_BINARY_DIR ${B_DIR})
     set(EXECUTABLE_OUTPUT_PATH   ${B_DIR})
     set(LIBRARY_OUTPUT_PATH      ${B_DIR})
-
 endif( MSVC )
 
 IF( EXIV2_ENABLE_XMP )
diff --git a/README-CMAKE b/README-CMAKE
index 30ae102..820b6c9 100644
--- a/README-CMAKE
+++ b/README-CMAKE
@@ -20,8 +20,7 @@ robin at clanmills.com
 -------------------------------------------------------------------------------
 
 Exiv2 uses cmake, a cross-platform build system, to control the
-compilation process using platform/compiler independent
-configuration files.
+compilation process using platform/compiler independent configuration files.
 
 TABLE OF CONTENTS
 -----------------
@@ -125,14 +124,9 @@ Code FileSystem Layout
 I set up my environment as follows:
  Directory of C:\gnu.cmake
 
-2012-05-31  09:49    <DIR>          exiv2           Vanilla
-2012-05-31  09:45    <DIR>          expat-2.1.0     source
-2012-05-30  16:22    <DIR>          zlib-1.2.7      trees
-
-Other versions of expat and zlib make be used (although I've never tested them)
-2012-05-19  21:29    <DIR>          expat-2.0.1
-2012-05-19  21:29    <DIR>          zlib-1.2.3
-2012-05-19  21:29    <DIR>          zlib-1.2.5
+2012-05-31  09:49    <DIR>          exiv2          | Vanilla
+2012-05-31  09:45    <DIR>          expat-2.1.0    | source
+2012-05-30  16:22    <DIR>          zlib-1.2.7     | trees
 
 The command to run cmake is of the form:
 cmake CMakeLists.txt -G "Visual Studio 9 2008 Win64"
@@ -149,56 +143,60 @@ You can skip step 1 if you have prebuilt libraries (see note below)
 
 1) Building the support libraries expat and zlib with cmake
    cd expat-2.1.0
-   Edit CMakeLists.txt to specify shared or static library
-   If you wish to use STATIC libries, you'll need the following patch (around line 23)
-   See "Note about expat-2.1.0/CMakeLists.txt"
+   If you wish to use a static library (shared is default)
+   a) set expat-2.1.0/CMakeLists.txt static 
+      option(BUILD_shared "build a shared expat library" ON)  <------- Set OFF
+   b) You'll need the following patch (around line 23)
+      See "Note about expat-2.1.0/CMakeLists.txt"
    
-   --- extract from CMakeLists.txt ---
-   option(XML_NS "Define to make XML Namespaces functionality available"  ON)
+      --- extract from CMakeLists.txt ---
+      option(XML_NS "Define to make XML Namespaces functionality available"  ON)
    
-   # rmills patch begin
-   include(../exiv2/CMake_msvc.txt)
-   msvc_runtime_configure(${BUILD_shared})
-   # rmills patch end
+      # rmills patch begin
+      include(../exiv2/CMake_msvc.txt)
+      msvc_runtime_configure(${BUILD_shared})
+      # rmills patch end
    
-   if(XML_DTD)
-   --- extract end ---
+      if(XML_DTD)
+      --- extract end ---
    
-   cmake CMakeLists.txt -G "Visual Studio 9 2008 Win64"
-   .... rattle roll ....
-   Open expat.sln and build all.
+     cmake CMakeLists.txt -G "Visual Studio 9 2008 Win64"
+     .... rattle roll ....
+     Open expat.sln and build all.
    
    Similar process for zlib-1.2.7
    You will not need to edit CMakeLists.txt (zlib builds shared and dynamic libraries)
-   cmake CMakeLists.txt -G "Visual Studio 9 2008 Win64"
-   .... rattle roll ....
-   Open zlib.sln and build all.
+      cmake CMakeLists.txt -G "Visual Studio 9 2008 Win64"
+      .... rattle roll ....
+      Open zlib.sln and build all.
    
 2) Building exiv2
-   cd exiv2
-   Edit CMakeLists.txt to specify shared or static library (and other options)
-   You may need to change the path specifications to expat and zlib to match your setup
-   
-   You will find path references in the files:
-   CMakeLists.txt ./src/CMakeLists.txt and ./samples/CMakeLists.txt  
-   
-   cmake CMakeLists.txt -G "Visual Studio 9 2008 Win64"
-   .... rattle roll ....
-   Open exiv2.sln and build all.
+   CMake recommend building "out of source" which means building in a clean
+   directory BELOW the source tree:
+   eg   cd exiv2
+   		Edit CMakeLists.txt to specify shared or static library (and other options)
+   		You may need to change the path to expat and zlib to match your setup
+   		
+        mkdir build
+        cd    build
+        cmake -G "Visual Studio 9 2008 Win64"  ..
+        ... rattle roll ...
+   	    Open build/exiv2.sln and build all.
    
 3) Location of built files (exiv2.exe, exiv2.dll etc)
-   exiv2in\{ x64 | Win32 }\{ Dynamic|Static }\{Config}\exiv2.exe etc....
+   exiv2uildin\{ x64 | Win32 }\{ Dynamic|Static }\{Config}\exiv2.exe etc....
    Config: Debug | MinSizeRel | Release | RelWithDebInfo
    
    The test suite is a bash script and requires Cygwin.
    
    cd /c/gnu/exiv2/test
-   ./testMSVC.sh ${PWD}/../bin/x64/Dynamic/Release
+   ./testMSVC.sh ${PWD}/../build/bin/x64/Dynamic/Release
    
    or
-   ./testMSVC.sh ${PWD}/../bin/x64/Dynamic/ | tee foo.txt
+   ./testMSVC.sh ${PWD}/../build/bin/x64/Dynamic/ | tee foo.txt
    ./verifyMSVC foo.txt
    
+   
 Note about expat-2.1.0/CMakeLists.txt
 -------------------------------------
    expat-2.1.0/CMakeLists.txt can build static or dynamic libraries.
@@ -214,7 +212,7 @@ However you may wish to use prebuilt versions of zlib, iconv and expat.
 Specify the location of the prebuilt libraries on the cmake command line:
 
 For example:
-cmake -G "NMake Makefiles" . -DEXPAT_LIBRARY=%KDE4_INSTALL_DIR%/lib/libexpat.lib
+cmake -G "NMake Makefiles" .. -DEXPAT_LIBRARY=%KDE4_INSTALL_DIR%/lib/libexpat.lib
 
 ToDo: More information about parameters -DEXPAT_LIBRARTY -DZLIB_LIBRARY etc.
 
diff --git a/TODO-CMAKE b/TODO-CMAKE
index a7f2fe3..0b38be2 100644
--- a/TODO-CMAKE
+++ b/TODO-CMAKE
@@ -1,6 +1,7 @@
 Current Status
 
-ToDo: * Support for out of source builds
+ToDo: * Find and link iconv library on Windows
+      * Polish/improve out of source builds
       * Test Cygwin, MinGW, Xcode, NMake and more versions of MSVC
       * Revisit searching for zlib, expat and iconv
       * Work on the "inherited from Gilles" list below
@@ -8,7 +9,8 @@ ToDo: * Support for out of source builds
 Bugs: * 2005/32/debug won't run. "SideBySide" error (manifest trouble)
 	  * 2003/32 does not compile (1000's of template errors)
 
-Done: * Add header files to MSVC UI for exiv2lib (and changed exiv2bin->exiv2 and exiv2->exiv2lib)
+Done: * Support for out of source builds (this is still suspect)
+      * Add header files to MSVC UI for exiv2lib (and changed exiv2bin->exiv2 and exiv2->exiv2lib)
       * Searching better for expat, zlib and iconv
 	  * write FindLibexiv2.cmake (Thank you, Gilles)
 	  * Builds and passes the test suite on 2005/32, 2008/64, Mac-Lion/64/Makefiles and Ubuntu/12.04/32bit
@@ -16,7 +18,7 @@ Done: * Add header files to MSVC UI for exiv2lib (and changed exiv2bin->exiv2 an
 
 Robin Mills
 robin at clanmills.com
-2012-06-05
+2012-06-09
 
 Inherited from Gilles Caulier <caulier dot gilles at gmail dot com>:
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index df84e3c..6b1bf02 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -207,7 +207,6 @@ IF( EXIV2_ENABLE_PNG )
 			if ( EXIV2_ENABLE_SHARED )		
 				TARGET_LINK_LIBRARIES( exiv2lib optimized ${ZLIB_LIBRARIES} debug ${ZLIB_LIBRARIES}d )
 			else()
-			#	link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../zlib-1.2.7/$(ConfigurationName))
 				TARGET_LINK_LIBRARIES( exiv2lib optimized zlibstatic.lib debug zlibstaticd.lib )
 			endif()
 		ELSE()
@@ -225,26 +224,47 @@ IF( ICONV_FOUND )
 ENDIF( ICONV_FOUND )
 
 IF (MSVC )
-    ADD_CUSTOM_COMMAND(
-      TARGET exiv2lib
-      PRE_BUILD
-      COMMAND if NOT exist ..\include mkdir ..\include
if NOT exist ..\include\exiv2 (
mkdir ..\include\exiv2
copy /y ..\src\*.h ..\include\exiv2
copy /y ..\src\*.hpp ..\include\exiv2
)
-    )
+	if (OUT_OF_SOURCE) 
+	    ADD_CUSTOM_COMMAND(
+	      TARGET exiv2lib
+	      PRE_BUILD
+	      COMMAND set S=$(SolutionDir)..\src
set I=$(SolutionDir)include
set E=%I%\exiv2
if NOT exist %I% mkdir %I%
if NOT exist %E% mkdir %E%
copy /y %S%\*.h %E%
copy /y %S%\*.hpp %E%
+	    )
+	else()
+	    ADD_CUSTOM_COMMAND(
+	      TARGET exiv2lib
+	      PRE_BUILD
+	      COMMAND set S=$(SolutionDir)src
set I=$(SolutionDir)include
set E=%I%\exiv2
if NOT exist %I% mkdir %I%
if NOT exist %E% mkdir %E%
copy /y %S%\*.h %E%
copy /y %S%\*.hpp %E%
+	    )
+	endif()
 ENDIF()
 
 ##
 # copy zlib and expat dlls to output directory if necessary
 IF ( MSVC AND EXIV2_ENABLE_SHARED )
-    ADD_CUSTOM_COMMAND(
-      TARGET exiv2lib
-      POST_BUILD
-      COMMAND copy /y $(SolutionDir)\..\expat-2.1.0\$(ConfigurationName)\*.dll $(SolutionDir)\bin\${P_DIR}\${T_DIR}\$(ConfigurationName)
-    )
-    ADD_CUSTOM_COMMAND(
-      TARGET exiv2lib
-      POST_BUILD
-      COMMAND copy /y $(SolutionDir)\..\zlib-1.2.7\$(ConfigurationName)\*.dll $(SolutionDir)\bin\${P_DIR}\${T_DIR}\$(ConfigurationName)
-    )
+	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()
 ENDIF()
 INSTALL( TARGETS exiv2lib ${INSTALL_TARGET_STANDARD_ARGS} )
 

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list