[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=7b49e90

The following commit has been merged in the master branch:
commit 7b49e908dc2e3a880a865e7ef3357ddc2992ee2a
Author: Robin Mills <robin at clanmills.com>
Date:   Wed Jun 6 04:46:02 2012 +0000

    see TODO-CMAKE for details. work in progress update
---
 CMakeLists.txt         | 21 +++++++++++----------
 README-CMAKE           | 38 +++++++++++++++++++++++++++++++-------
 TODO-CMAKE             | 18 +++++++++++-------
 samples/CMakeLists.txt |  4 ++--
 src/CMakeLists.txt     | 50 +++++++++++++++++++++++++++-----------------------
 5 files changed, 82 insertions(+), 49 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 506be78..1b2015e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,16 +50,17 @@ if( MSVC )
 	msvc_runtime_configure(${EXIV2_ENABLE_SHARED})
 	msvc_runtime_report()
 
-	##
-	# 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 ( 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      )
+	endif()
+	
 	if ( EXIV2_ENABLE_SHARED )
 	    add_library(expat-2.1.0 SHARED IMPORTED)
 	    add_library(zlib-1.2.7  SHARED IMPORTED)
diff --git a/README-CMAKE b/README-CMAKE
index 29fb364..30ae102 100644
--- a/README-CMAKE
+++ b/README-CMAKE
@@ -109,12 +109,12 @@ msvc64: 32 bit AND 64 bit build environment for MSVC 2005 (and 2008 and 2010)
 cmake:  This environment
 
 CMake doesn't build code.  It generates build environments.
-CMake is a language for describing builds and the language interpreter generates
+CMake is a language for describing builds and the CMake interpreter generates
 the build environment for your system.
 
 CMake generates MSVC .sln and .vcproj files for your target environment.
 The files generated by CMake provide 4 configs: Debug|Release|RelWithDebInfo|MinSizeRel
-The current architecture of CMake requires you to decide before running cmake about:
+The current architecture of CMake requires you to decide before running cmake:
 1)	The version of DevStudio
 2)  32bit or 64 bit builds
 3)  Building static or shared libraries
@@ -141,12 +141,16 @@ There are many options for the cmake command, and many generators.  I've added a
 batch file cm.bat for my convenience.
 c:\> cm 2008 64 == cmake CMakeLists.txt -G "Visual Studio 9 2008 Win64" 
 
-Building with cmake involves 3 steps (build zlib/expat, build exiv2, test):
+Building from source
+--------------------
 
-1) Building the support libraries expat and zlib (with cmake)
+There are 3 steps (build zlib/expat, build exiv2, test).
+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)
+   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"
    
    --- extract from CMakeLists.txt ---
@@ -175,7 +179,7 @@ Building with cmake involves 3 steps (build zlib/expat, build exiv2, test):
    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 three files:
+   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"
@@ -185,7 +189,16 @@ Building with cmake involves 3 steps (build zlib/expat, build exiv2, test):
 3) Location of built files (exiv2.exe, exiv2.dll etc)
    exiv2in\{ 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
+   
+   or
+   ./testMSVC.sh ${PWD}/../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.
@@ -193,6 +206,17 @@ Note about expat-2.1.0/CMakeLists.txt
    I've taken a decision to either link "All static" or "All dynamic" with no mixing.
    This patch enforces my design and avoids linker headaches.
 
+Note about using prebuilt zlib, expat and iconv
+-----------------------------------------------
+
+I expect you to setup the source build tree and build expat and zlib.
+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
+
+ToDo: More information about parameters -DEXPAT_LIBRARTY -DZLIB_LIBRARY etc.
 
 4 Building and Installing for other users (Xcode, Eclipse, Qt)
 ==============================================================
diff --git a/TODO-CMAKE b/TODO-CMAKE
index ad48e65..a7f2fe3 100644
--- a/TODO-CMAKE
+++ b/TODO-CMAKE
@@ -1,18 +1,22 @@
-My current list
+Current Status
 
-ToDo: * 2005/32/debug won't run. "SideBySide" error (manifest trouble)
-      * I'm not searching correctly for expat, zlib and iconv
+ToDo: * Support for out of source builds
       * Test Cygwin, MinGW, Xcode, NMake and more versions of MSVC
-      * Test Out of source builds
-      * Add the header files to the MSVC UI 
+      * Revisit searching for zlib, expat and iconv
+      * Work on the "inherited from Gilles" list below
 
-Done: * write FindLibexiv2.cmake (Thank you, Gilles)
+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)
+      * 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
       * Updated documentation (README-CMAKE)
 
 Robin Mills
 robin at clanmills.com
-2012-06-03
+2012-06-05
 
 Inherited from Gilles Caulier <caulier dot gilles at gmail dot com>:
 
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
index d7a8d88..37b1b15 100644
--- a/samples/CMakeLists.txt
+++ b/samples/CMakeLists.txt
@@ -11,7 +11,7 @@ if (MSVC)
 	include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../include ${CMAKE_CURRENT_SOURCE_DIR}/../msvc64/include )
 	
 	if ( NOT EXIV2_ENABLE_SHARED )		
-		link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../zlib-1.2.7/$(ConfigurationName))
+	#	link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../zlib-1.2.7/$(ConfigurationName))
 	endif()
 endif()
 
@@ -43,7 +43,7 @@ FOREACH(entry ${SAMPLES})
     STRING( REPLACE ".cpp" "" target ${entry})
     ADD_EXECUTABLE( ${target} ${target}.cpp )
     ADD_TEST( ${target}_test ${target} )
-    TARGET_LINK_LIBRARIES( ${target} exiv2 )
+    TARGET_LINK_LIBRARIES( ${target} exiv2lib )
 ENDFOREACH(entry ${SAMPLES})
 
 # That's all Folks!
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6f25612..df84e3c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -181,47 +181,52 @@ include(../CMake_msvc.txt)
 msvc_runtime_configure(${EXIV2_ENABLE_SHARED})
 
 # ******************************************************************************
-# exiv2 library
-ADD_LIBRARY( exiv2 ${STATIC_FLAG} ${LIBEXIV2_SRC} )
-SET_TARGET_PROPERTIES( exiv2 PROPERTIES
+# exiv2lib library
+ADD_LIBRARY( exiv2lib ${STATIC_FLAG} ${LIBEXIV2_SRC} ${LIBEXIV2_HDR} )
+SET_TARGET_PROPERTIES( exiv2lib PROPERTIES
 	VERSION       ${GENERIC_LIB_VERSION}
 	SOVERSION     ${GENERIC_LIB_SOVERSION}
 	DEFINE_SYMBOL EXV_BUILDING_LIB
+	OUTPUT_NAME   exiv2
 )
-TARGET_LINK_LIBRARIES( exiv2 ${EXPAT_LIBRARIES} )
+if ( MSVC ) 
+	source_group("Header Files" FILES ${LIBEXIV2_HDR} )
+endif()
+
+TARGET_LINK_LIBRARIES( exiv2lib ${EXPAT_LIBRARIES} )
 
 if( EXIV2_ENABLE_LIBXMP )
-	ADD_DEPENDENCIES( exiv2 xmp )
+	ADD_DEPENDENCIES( exiv2lib xmp )
 	LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH}/$(ConfigurationName))
-	TARGET_LINK_LIBRARIES( exiv2 xmp )
+	TARGET_LINK_LIBRARIES( exiv2lib xmp )
 ENDIF()
 
 IF( EXIV2_ENABLE_PNG )
 	IF( ZLIB_FOUND )
 		IF( MSVC )
 			if ( EXIV2_ENABLE_SHARED )		
-				TARGET_LINK_LIBRARIES( exiv2 optimized ${ZLIB_LIBRARIES} debug ${ZLIB_LIBRARIES}d )
+				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( exiv2 optimized zlibstatic.lib debug zlibstaticd.lib )
+			#	link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../zlib-1.2.7/$(ConfigurationName))
+				TARGET_LINK_LIBRARIES( exiv2lib optimized zlibstatic.lib debug zlibstaticd.lib )
 			endif()
 		ELSE()
-			TARGET_LINK_LIBRARIES( exiv2 ${ZLIB_LIBRARIES} )
+			TARGET_LINK_LIBRARIES( exiv2lib ${ZLIB_LIBRARIES} )
 		ENDIF()
 	ENDIF()
 ENDIF()
 
 IF( EXIV2_ENABLE_NLS )
-	TARGET_LINK_LIBRARIES( exiv2 ${LIBINTL_LIBRARIES} )
+	TARGET_LINK_LIBRARIES( exiv2lib ${LIBINTL_LIBRARIES} )
 ENDIF( EXIV2_ENABLE_NLS )
 
 IF( ICONV_FOUND )
-	TARGET_LINK_LIBRARIES( exiv2 ${ICONV_LIBRARIES} )
+	TARGET_LINK_LIBRARIES( exiv2lib ${ICONV_LIBRARIES} )
 ENDIF( ICONV_FOUND )
 
 IF (MSVC )
     ADD_CUSTOM_COMMAND(
-      TARGET exiv2
+      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
)
     )
@@ -231,42 +236,41 @@ ENDIF()
 # copy zlib and expat dlls to output directory if necessary
 IF ( MSVC AND EXIV2_ENABLE_SHARED )
     ADD_CUSTOM_COMMAND(
-      TARGET exiv2
+      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 exiv2
+      TARGET exiv2lib
       POST_BUILD
       COMMAND copy /y $(SolutionDir)\..\zlib-1.2.7\$(ConfigurationName)\*.dll $(SolutionDir)\bin\${P_DIR}\${T_DIR}\$(ConfigurationName)
     )
 ENDIF()
-INSTALL( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )
+INSTALL( TARGETS exiv2lib ${INSTALL_TARGET_STANDARD_ARGS} )
 
 # ******************************************************************************
 # exiv2 application
-ADD_EXECUTABLE( exiv2bin ${EXIV2_SRC} )
-SET_TARGET_PROPERTIES( exiv2bin PROPERTIES OUTPUT_NAME exiv2 )
-TARGET_LINK_LIBRARIES( exiv2bin exiv2 )
-INSTALL( TARGETS exiv2bin ${INSTALL_TARGET_STANDARD_ARGS} )
+ADD_EXECUTABLE( exiv2 ${EXIV2_SRC} )
+TARGET_LINK_LIBRARIES( exiv2 exiv2lib )
+INSTALL( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )
 
 # ******************************************************************************
 # metacopy sample application
 ADD_EXECUTABLE( metacopy ${MC_SRC} )
-TARGET_LINK_LIBRARIES( metacopy exiv2 )
+TARGET_LINK_LIBRARIES( metacopy exiv2lib )
 INSTALL( TARGETS metacopy ${INSTALL_TARGET_STANDARD_ARGS} )
 
 # ******************************************************************************
 # taglist sample application
 ADD_EXECUTABLE( taglist ${TAGLIST_SRC} )
-TARGET_LINK_LIBRARIES( taglist exiv2 )
+TARGET_LINK_LIBRARIES( taglist exiv2lib )
 INSTALL( TARGETS taglist ${INSTALL_TARGET_STANDARD_ARGS} )
 
 # ******************************************************************************
 # path-test sample application
 ADD_EXECUTABLE( pathtest ${PATHTEST_SRC} )
 SET_TARGET_PROPERTIES( pathtest PROPERTIES OUTPUT_NAME path-test )
-TARGET_LINK_LIBRARIES( pathtest exiv2 )
+TARGET_LINK_LIBRARIES( pathtest exiv2lib )
 INSTALL( TARGETS pathtest ${INSTALL_TARGET_STANDARD_ARGS} )
 
 # ******************************************************************************

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list