Skip to content

Commit

Permalink
use dedicated licence file for CMake Script, as it done into KDE proj…
Browse files Browse the repository at this point in the history
…ect.
  • Loading branch information
cgilles committed Mar 27, 2012
1 parent 5ded0d6 commit d3aaf04
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 92 deletions.
160 changes: 68 additions & 92 deletions CMakeLists.txt
@@ -1,33 +1,9 @@
# 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.
# Copyright 2008 by Patrick Spendrin <ps_ml at gmx dot de>
# Copyright 2010-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

PROJECT( exiv2 )

Expand Down Expand Up @@ -69,59 +45,59 @@ ENDIF( MINGW OR UNIX )

if( MSVC )

# add_library("../zlib-1.2.5" SHARED IMPORTED)

#include_directories( "../zlib-1.2.5" "../expat-2.0.1/lib" )
#set(EXPAT_INCLUDE_DIR "../expat-2.0.1/lib" )
#set(ZLIB_INCLUDE_DIR "../zlib-1.2.5" )
#set(EXPAT_LIBRARY "../expat-2.0.1")
#set(ZLIB_LIBRARY "../zlib-1.2.5" )
# target_link_libraries("zlibd.lib")
# add_subdirectory("../zlib-1.2.5" "../zlib-1.2.5" )
# set_target_properties(exiv2 PROPERTIES LINK_FLAGS "/LIBPATH:../zlib-1.2.5/$(ConfigurationName)")
# target_link_libraries(A B)
# set_property(TARGET PROPERTY LINK_FLAGS "/LIBPATH:../zlib-1.2.5/$(ConfigurationName)")
# cmake CMakeLists.txt -G "Visual Studio 9 2008" (Win64)
# cm.bat 2008 64 "-DEXIV2_ENABLE_SHARED=OFF" (32/ON) for 4 builds
# for %p in (Debug,Release) do devenv exiv2.sln /build %p for 2 builds
set( P_DIR Win32 )
set( T_DIR Static)

# 64 bit
if( CMAKE_SIZEOF_VOID_P MATCHES 8 )
SET( P_DIR x64)
endif( CMAKE_SIZEOF_VOID_P MATCHES 8 )
# DLL/static build
if( EXIV2_ENABLE_SHARED )
set( T_DIR Dynamic )
endif( EXIV2_ENABLE_SHARED )

set(B_DIR ${PROJECT_BINARY_DIR}/bin/${P_DIR}/${T_DIR})
set(CMAKE_CURRENT_BINARY_DIR ${B_DIR})
set(EXECUTABLE_OUTPUT_PATH ${B_DIR})
set(LIBRARY_OUTPUT_PATH ${B_DIR})
#if ( EXIV2_ENABLE_XMP )
# ..\expat\Win32\Debug\libexpat.lib
# ..\xmpsdk\Win32\Debug\xmpsdk.lib
# ..\zlib\Win32\Debug\zlib1d.lib
#endif( EXIV2_ENABLE_XMP )
# add_library("../zlib-1.2.5" SHARED IMPORTED)

#include_directories( "../zlib-1.2.5" "../expat-2.0.1/lib" )
#set(EXPAT_INCLUDE_DIR "../expat-2.0.1/lib" )
#set(ZLIB_INCLUDE_DIR "../zlib-1.2.5" )

#set(EXPAT_LIBRARY "../expat-2.0.1")
#set(ZLIB_LIBRARY "../zlib-1.2.5" )

# target_link_libraries("zlibd.lib")
# add_subdirectory("../zlib-1.2.5" "../zlib-1.2.5" )
# set_target_properties(exiv2 PROPERTIES LINK_FLAGS "/LIBPATH:../zlib-1.2.5/$(ConfigurationName)")
# target_link_libraries(A B)
# set_property(TARGET PROPERTY LINK_FLAGS "/LIBPATH:../zlib-1.2.5/$(ConfigurationName)")

# cmake CMakeLists.txt -G "Visual Studio 9 2008" (Win64)
# cm.bat 2008 64 "-DEXIV2_ENABLE_SHARED=OFF" (32/ON) for 4 builds
# for %p in (Debug,Release) do devenv exiv2.sln /build %p for 2 builds
set( P_DIR Win32 )
set( T_DIR Static)

# 64 bit
if( CMAKE_SIZEOF_VOID_P MATCHES 8 )
SET( P_DIR x64)
endif( CMAKE_SIZEOF_VOID_P MATCHES 8 )

# DLL/static build
if( EXIV2_ENABLE_SHARED )
set( T_DIR Dynamic )
endif( EXIV2_ENABLE_SHARED )

set(B_DIR ${PROJECT_BINARY_DIR}/bin/${P_DIR}/${T_DIR})
set(CMAKE_CURRENT_BINARY_DIR ${B_DIR})
set(EXECUTABLE_OUTPUT_PATH ${B_DIR})
set(LIBRARY_OUTPUT_PATH ${B_DIR})

#if ( EXIV2_ENABLE_XMP )
# ..\expat\Win32\Debug\libexpat.lib
# ..\xmpsdk\Win32\Debug\xmpsdk.lib
# ..\zlib\Win32\Debug\zlib1d.lib
#endif( EXIV2_ENABLE_XMP )
endif( MSVC )

#IF( MINGW OR UNIX )
IF( EXIV2_ENABLE_XMP )
SET( HAVE_XMP_TOOLKIT ON )
SET( XMPLIB "do" )
ENDIF( EXIV2_ENABLE_XMP )
IF( EXIV2_ENABLE_XMP )
SET( HAVE_XMP_TOOLKIT ON )
SET( XMPLIB "do" )
ENDIF( EXIV2_ENABLE_XMP )
#ENDIF( MINGW OR UNIX )

#IF( MINGW OR UNIX )
INCLUDE( config/ConfigureChecks.cmake )
INCLUDE( config/ConfigureChecks.cmake )
#ENDIF( MINGW OR UNIX )

SET( INSTALL_TARGET_STANDARD_ARGS
Expand All @@ -132,23 +108,23 @@ SET( INSTALL_TARGET_STANDARD_ARGS

# add sources from XMPSDK directory - this needs to be done here
#IF( MINGW OR UNIX )
SET( XMPSRC ${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/ExpatAdapter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/MD5.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/ParseRDF.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/UnicodeConversions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/WXMPIterator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/WXMPMeta.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/WXMPUtils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XML_Node.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPCore_Impl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPIterator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta-GetSet.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta-Parse.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta-Serialize.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPUtils-FileInfo.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPUtils.cpp
)
SET( XMPSRC ${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/ExpatAdapter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/MD5.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/ParseRDF.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/UnicodeConversions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/WXMPIterator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/WXMPMeta.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/WXMPUtils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XML_Node.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPCore_Impl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPIterator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta-GetSet.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta-Parse.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta-Serialize.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPUtils-FileInfo.cpp
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPUtils.cpp
)
#ENDIF( MINGW OR UNIX )

# the following lines need to be added to circumvent the error in xmpsdk\src\MD5.h
Expand Down
22 changes: 22 additions & 0 deletions COPYING-CMAKE-SCRIPTS
@@ -0,0 +1,22 @@
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 copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the 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.
3 changes: 3 additions & 0 deletions config/FindEXPAT.cmake
Expand Up @@ -4,6 +4,9 @@
# EXPAT_INCLUDE_DIRS - where to find expat.h, etc.
# EXPAT_LIBRARIES - List of libraries when using expat.
# EXPAT_FOUND - True if expat found.
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

# Look for the header file.
FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h)
Expand Down
3 changes: 3 additions & 0 deletions config/FindMSGFMT.cmake
Expand Up @@ -17,6 +17,9 @@
# look in C:\MinGW after std. Unix places, that's where
# gettext automatically installed itself on my system.
# TODO find where else on Windows, Mac, etc gettext might be
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

IF(MSGFMT_EXECUTABLE)
SET(MSGFMT_FOUND TRUE)
Expand Down

0 comments on commit d3aaf04

Please sign in to comment.