added new rules to manage translations file.

Code inspired from huggin project. 
This use a shell script. this one must be ported to CMake.
This commit is contained in:
HumanDynamo 2010-04-20 14:37:04 +00:00
parent 41b1c43bd7
commit c05265e5cf
5 changed files with 60 additions and 19 deletions

View File

@ -46,13 +46,14 @@ SET( GENERIC_LIB_SOVERSION "6" )
# options and there default values
OPTION( EXIV2_ENABLE_SHARED "Build exiv2 as a shared library (dll)" ON )
OPTION( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON )
OPTION( EXIV2_ENABLE_LIBXMP "Build a static convenience Library for XMP" OFF )
OPTION( EXIV2_EXIV2_ENABLE_LIBXMP "Build a static convenience Library for XMP" OFF )
OPTION( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON )
OPTION( EXIV2_ENABLE_NLS "Build native language support (requires gettext)" ON )
OPTION( EXIV2_ENABLE_PRINTUCS2 "Build with Printucs2" ON )
OPTION( EXIV2_ENABLE_LENSDATA "Build including lens data" ON )
OPTION( EXIV2_ENABLE_COMMERCIAL "Build with the EXV_COMMERCIAL_VERSION symbol set" OFF )
OPTION( EXIV2_ENABLE_BUILD_SAMPLES "Build the unit tests" OFF )
OPTION( EXIV2_ENABLE_PO_RULES "Includes rules to build i18n files" OFF )
IF( MINGW OR UNIX )
ADD_DEFINITIONS(-Wall
@ -105,6 +106,10 @@ ENDIF( ${EXV_HAVE_STDINT_H} )
ADD_SUBDIRECTORY( xmpsdk )
ADD_SUBDIRECTORY( src )
IF( EXIV2_ENABLE_PO_RULES )
ADD_SUBDIRECTORY( po )
ENDIF( EXIV2_ENABLE_PO_RULES )
IF( EXIV2_ENABLE_BUILD_SAMPLES )
ADD_SUBDIRECTORY( samples )
ENDIF( EXIV2_ENABLE_BUILD_SAMPLES )

View File

@ -259,15 +259,16 @@ MACRO( OptionOutput _outputstring )
MESSAGE( STATUS "${_outputstring}${_var}" )
ENDMACRO( OptionOutput _outputstring )
MESSAGE( STATUS "-------------------------------------------------------------" )
MESSAGE( STATUS "${PACKAGE_STRING} configure results <${PACKAGE_URL}>" )
OptionOutput( "Building PNG support: " EXIV2_ENABLE_PNG AND ZLIB_FOUND )
OptionOutput( "Building shared library: " EXIV2_ENABLE_SHARED )
OptionOutput( "XMP metadata support: " EXIV2_ENABLE_XMP )
OptionOutput( "Building static libxmp: " ENABLE_LIBXMP )
OptionOutput( "Native language support: " EXIV2_ENABLE_NLS )
OptionOutput( "Conversion of Windows XP tags: " EXIV2_ENABLE_PRINTUCS2 )
OptionOutput( "Nikon lens database: " EXIV2_ENABLE_LENSDATA )
OptionOutput( "Commercial build: " EXIV2_ENABLE_COMMERCIAL )
OptionOutput( "Build the unit tests " EXIV2_ENABLE_BUILD_SAMPLES )
MESSAGE( STATUS "-------------------------------------------------------------" )
MESSAGE( STATUS "-----------------------------------------------------------------" )
MESSAGE( STATUS "${PACKAGE_STRING} configure results <${PACKAGE_URL}>" )
OptionOutput( "Building PNG support: " EXIV2_ENABLE_PNG AND ZLIB_FOUND )
OptionOutput( "Building shared library: " EXIV2_ENABLE_SHARED )
OptionOutput( "XMP metadata support: " EXIV2_ENABLE_XMP )
OptionOutput( "Building static libxmp: " EXIV2_ENABLE_LIBXMP )
OptionOutput( "Native language support: " EXIV2_ENABLE_NLS )
OptionOutput( "Conversion of Windows XP tags: " EXIV2_ENABLE_PRINTUCS2 )
OptionOutput( "Nikon lens database: " EXIV2_ENABLE_LENSDATA )
OptionOutput( "Commercial build: " EXIV2_ENABLE_COMMERCIAL )
OptionOutput( "Build the unit tests " EXIV2_ENABLE_BUILD_SAMPLES )
OptionOutput( "Includes rules to build i18n files " EXIV2_ENABLE_PO_RULES )
MESSAGE( STATUS "-----------------------------------------------------------------" )

35
po/CMakeLists.txt Normal file
View File

@ -0,0 +1,35 @@
# CMake build system for exiv2 library and executables
# Copyright 2008 by Patrick Spendrin <ps_ml@gmx.de>
# Copyright 2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# 3. The name of the author may not be used to endorse or promote
# products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# automatically include all po files in the directory
FILE(GLOB PO_FILES *.po)
ADD_TRANSLATIONS(hugin ${PO_FILES})

0
po/README-CMAKE Normal file
View File

View File

@ -173,9 +173,9 @@ IF( MSVC )
ENDIF( MSVC )
IF( EXIV2_ENABLE_XMP )
IF( NOT EXIV2_ENABLE_LIBXMP )
IF( NOT EXIV2_EXIV2_ENABLE_LIBXMP )
SET( LIBEXIV2_SRC ${XMPSRC} ${LIBEXIV2_SRC} )
ENDIF( NOT EXIV2_ENABLE_LIBXMP )
ENDIF( NOT EXIV2_EXIV2_ENABLE_LIBXMP )
ENDIF( EXIV2_ENABLE_XMP )
# ******************************************************************************
@ -189,9 +189,9 @@ SET_TARGET_PROPERTIES( exiv2 PROPERTIES VERSION ${GENERIC_LIB_VERSION}
TARGET_LINK_LIBRARIES( exiv2 ${EXPAT_LIBRARIES} )
if( EXIV2_ENABLE_LIBXMP )
if( EXIV2_EXIV2_ENABLE_LIBXMP )
TARGET_LINK_LIBRARIES( exiv2 ${XMPLIB} )
ENDIF( EXIV2_ENABLE_LIBXMP )
ENDIF( EXIV2_EXIV2_ENABLE_LIBXMP )
IF( EXIV2_ENABLE_PNG )
IF( ZLIB_FOUND )
@ -203,9 +203,9 @@ IF( EXIV2_ENABLE_NLS )
TARGET_LINK_LIBRARIES( exiv2 ${LIBINTL_LIBRARIES} )
ENDIF( EXIV2_ENABLE_NLS )
IF( ICONV_TEST )
IF( ICONV_FOUND )
TARGET_LINK_LIBRARIES( exiv2 ${ICONV_LIBRARIES} )
ENDIF( ICONV_TEST )
ENDIF( ICONV_FOUND )
INSTALL( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )