diff --git a/appveyor.yml b/appveyor.yml index 1c29ca7d..aa73377a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,13 +1,5 @@ environment: matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - CMAKE_GENERATOR: Visual Studio 9 2008 - INTEGRATION_TESTS: 0 - VS_COMPILER_VERSION: 9 - VCVARS: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat - ARCHITECTURE: x86 - UNIT_TESTS: 0 - WARNINGS_AS_ERRORS: OFF - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 CMAKE_GENERATOR: Visual Studio 10 2010 INTEGRATION_TESTS: 0 diff --git a/cmake/compilerFlagsExiv2.cmake b/cmake/compilerFlagsExiv2.cmake index d4e8b4d4..8d9e57d4 100644 --- a/cmake/compilerFlagsExiv2.cmake +++ b/cmake/compilerFlagsExiv2.cmake @@ -3,6 +3,7 @@ if (MINGW OR UNIX) # MINGW, Linux, APPLE, CYGWIN if ( EXIV2_TEAM_WARNINGS_AS_ERRORS ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-declarations") endif () endif() diff --git a/cmake/mainSetup.cmake b/cmake/mainSetup.cmake index a4d983d4..955aa180 100644 --- a/cmake/mainSetup.cmake +++ b/cmake/mainSetup.cmake @@ -5,6 +5,14 @@ include(GNUInstallDirs) include(CheckFunctionExists) include(GenerateExportHeader) include(CMakeDependentOption) +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header( + FILE exiv2lib_compiler_detection.h + PREFIX EXIV2 + COMPILERS GNU Clang AppleClang MSVC + FEATURES cxx_attribute_deprecated +) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) diff --git a/cmake/printSummary.cmake b/cmake/printSummary.cmake index c7459c91..ea66165b 100644 --- a/cmake/printSummary.cmake +++ b/cmake/printSummary.cmake @@ -65,5 +65,8 @@ OptionOutput( "Building doc: " EXIV2_BUILD_DOC OptionOutput( "Building with coverage flags: " BUILD_WITH_COVERAGE ) OptionOutput( "Using ccache: " BUILD_WITH_CCACHE ) +message( STATUS "------------------------------------------------------------------" ) + +message(STATUS " WARNING: Deprecated features: EPS, Video, Ssh") message( STATUS "------------------------------------------------------------------" ) diff --git a/include/exiv2/asfvideo.hpp b/include/exiv2/asfvideo.hpp index e1b57e12..947af441 100644 --- a/include/exiv2/asfvideo.hpp +++ b/include/exiv2/asfvideo.hpp @@ -31,6 +31,7 @@ #include "exiv2lib_export.h" // included header files +#include "exiv2lib_compiler_detection.h" #include "image.hpp" namespace Exiv2 { @@ -46,7 +47,7 @@ namespace Exiv2 { /*! @brief Class to access ASF video files. */ - class EXIV2API AsfVideo:public Image + class EXIV2_DEPRECATED EXIV2API AsfVideo:public Image { public: //! @name Creators @@ -169,10 +170,10 @@ namespace Exiv2 { Caller owns the returned object and the auto-pointer ensures that it will be deleted. */ - EXIV2API Image::AutoPtr newAsfInstance(BasicIo::AutoPtr io, bool create); + EXIV2_DEPRECATED EXIV2API Image::AutoPtr newAsfInstance(BasicIo::AutoPtr io, bool create); //! Check if the file iIo is a Windows Asf Video. - EXIV2API bool isAsfType(BasicIo& iIo, bool advance); + EXIV2_DEPRECATED EXIV2API bool isAsfType(BasicIo& iIo, bool advance); } // namespace Exiv2 diff --git a/include/exiv2/basicio.hpp b/include/exiv2/basicio.hpp index bd580b0e..0c8d7d99 100644 --- a/include/exiv2/basicio.hpp +++ b/include/exiv2/basicio.hpp @@ -27,6 +27,7 @@ #include "exiv2lib_export.h" // included header files +#include "exiv2lib_compiler_detection.h" #include "types.hpp" // + standard includes @@ -1112,7 +1113,7 @@ namespace Exiv2 { @brief Provides the ssh read/write access and sftp read access for the RemoteIo. This class is based on libssh. */ - class EXIV2API SshIo : public RemoteIo { + class EXIV2_DEPRECATED EXIV2API SshIo : public RemoteIo { public: //! @name Creators //@{ diff --git a/include/exiv2/epsimage.hpp b/include/exiv2/epsimage.hpp index 069b9ad9..aeebb02e 100644 --- a/include/exiv2/epsimage.hpp +++ b/include/exiv2/epsimage.hpp @@ -38,6 +38,7 @@ #include "exiv2lib_export.h" // included header files +#include "exiv2lib_compiler_detection.h" #include "image.hpp" // ***************************************************************************** @@ -56,7 +57,7 @@ namespace Exiv2 /*! @brief Class to access EPS images. */ - class EXIV2API EpsImage : public Image { + class EXIV2_DEPRECATED EXIV2API EpsImage : public Image { public: //! @name Creators //@{ @@ -114,10 +115,10 @@ namespace Exiv2 Caller owns the returned object and the auto-pointer ensures that it will be deleted. */ - EXIV2API Image::AutoPtr newEpsInstance(BasicIo::AutoPtr io, bool create); + EXIV2_DEPRECATED EXIV2API Image::AutoPtr newEpsInstance(BasicIo::AutoPtr io, bool create); //! Check if the file iIo is a EPS image. - EXIV2API bool isEpsType(BasicIo& iIo, bool advance); + EXIV2_DEPRECATED EXIV2API bool isEpsType(BasicIo& iIo, bool advance); } // namespace Exiv2 diff --git a/include/exiv2/matroskavideo.hpp b/include/exiv2/matroskavideo.hpp index dc87fee6..58cff8cc 100644 --- a/include/exiv2/matroskavideo.hpp +++ b/include/exiv2/matroskavideo.hpp @@ -31,6 +31,7 @@ #include "exiv2lib_export.h" // included header files +#include "exiv2lib_compiler_detection.h" #include "image.hpp" // ***************************************************************************** @@ -49,7 +50,7 @@ namespace Exiv2 { /*! @brief Helper structure for the Matroska tags lookup table. */ - struct MatroskaTags { + struct EXIV2_DEPRECATED MatroskaTags { uint64_t val_; //!< Tag value const char* label_; //!< Translation of the tag value @@ -60,7 +61,7 @@ namespace Exiv2 { /*! @brief Class to access Matroska video files. */ - class EXIV2API MatroskaVideo : public Image { + class EXIV2_DEPRECATED EXIV2API MatroskaVideo : public Image { public: //! @name Creators //@{ @@ -145,10 +146,10 @@ namespace Exiv2 { Caller owns the returned object and the auto-pointer ensures that it will be deleted. */ - EXIV2API Image::AutoPtr newMkvInstance(BasicIo::AutoPtr io, bool create); + EXIV2_DEPRECATED EXIV2API Image::AutoPtr newMkvInstance(BasicIo::AutoPtr io, bool create); //! Check if the file iIo is a Matroska Video. - EXIV2API bool isMkvType(BasicIo& iIo, bool advance); + EXIV2_DEPRECATED EXIV2API bool isMkvType(BasicIo& iIo, bool advance); } // namespace Exiv2 diff --git a/include/exiv2/quicktimevideo.hpp b/include/exiv2/quicktimevideo.hpp index f22a7eff..83c9c9bd 100644 --- a/include/exiv2/quicktimevideo.hpp +++ b/include/exiv2/quicktimevideo.hpp @@ -49,7 +49,7 @@ namespace Exiv2 { /*! @brief Class to access QuickTime video files. */ - class EXIV2API QuickTimeVideo:public Image + class EXIV2_DEPRECATED EXIV2API QuickTimeVideo:public Image { public: //! @name Creators @@ -242,10 +242,10 @@ namespace Exiv2 { Caller owns the returned object and the auto-pointer ensures that it will be deleted. */ - EXIV2API Image::AutoPtr newQTimeInstance(BasicIo::AutoPtr io, bool create); + EXIV2_DEPRECATED EXIV2API Image::AutoPtr newQTimeInstance(BasicIo::AutoPtr io, bool create); //! Check if the file iIo is a Quick Time Video. - EXIV2API bool isQTimeType(BasicIo& iIo, bool advance); + EXIV2_DEPRECATED EXIV2API bool isQTimeType(BasicIo& iIo, bool advance); } // namespace Exiv2 diff --git a/include/exiv2/riffvideo.hpp b/include/exiv2/riffvideo.hpp index a7072f29..a2295545 100644 --- a/include/exiv2/riffvideo.hpp +++ b/include/exiv2/riffvideo.hpp @@ -32,6 +32,7 @@ // included header files #include "exif.hpp" +#include "exiv2lib_compiler_detection.h" #include "image.hpp" // ***************************************************************************** @@ -49,7 +50,7 @@ namespace Exiv2 { /*! @brief Class to access RIFF video files. */ - class EXIV2API RiffVideo:public Image + class EXIV2_DEPRECATED EXIV2API RiffVideo:public Image { public: //! @name Creators @@ -210,10 +211,10 @@ namespace Exiv2 { Caller owns the returned object and the auto-pointer ensures that it will be deleted. */ - EXIV2API Image::AutoPtr newRiffInstance(BasicIo::AutoPtr io, bool create); + EXIV2_DEPRECATED EXIV2API Image::AutoPtr newRiffInstance(BasicIo::AutoPtr io, bool create); //! Check if the file iIo is a Riff Video. - EXIV2API bool isRiffType(BasicIo& iIo, bool advance); + EXIV2_DEPRECATED EXIV2API bool isRiffType(BasicIo& iIo, bool advance); } // namespace Exiv2 diff --git a/include/exiv2/ssh.hpp b/include/exiv2/ssh.hpp index 3ec1839e..a5d2d213 100644 --- a/include/exiv2/ssh.hpp +++ b/include/exiv2/ssh.hpp @@ -28,7 +28,9 @@ #include #include #include + #include "error.hpp" +#include "exiv2lib_compiler_detection.h" #include "types.hpp" #include "futils.hpp" @@ -38,7 +40,7 @@ namespace Exiv2 { It makes the libssh transparent. The functions in this class can be used without the requirement of understanding libssh. */ - class EXIV2API SSH { + class EXIV2_DEPRECATED EXIV2API SSH { public: //! @name Creators //@{ diff --git a/include/exiv2/utilsvideo.hpp b/include/exiv2/utilsvideo.hpp index 9a725925..60195b50 100644 --- a/include/exiv2/utilsvideo.hpp +++ b/include/exiv2/utilsvideo.hpp @@ -18,6 +18,10 @@ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA. */ +#ifndef UTILSVIDEO_HPP_ +#define UTILSVIDEO_HPP_ + +#include "exiv2lib_compiler_detection.h" namespace Exiv2 { @@ -25,7 +29,7 @@ namespace Exiv2 /*! @brief Class of utility functions used by the video code. */ - class UtilsVideo + class EXIV2_DEPRECATED UtilsVideo { public: /*! @@ -56,3 +60,5 @@ namespace Exiv2 }; // class UtilsVideo } // namespace Exiv2 + +#endif // #ifndef UTILSVIDEO_HPP_ \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fae0f882..05e8e0a1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,7 +44,6 @@ add_library( exiv2lib ../include/exiv2/exiv2.hpp ../include/exiv2/rwlock.hpp ../include/exiv2/slice.hpp - asfvideo.cpp ../include/exiv2/asfvideo.hpp basicio.cpp ../include/exiv2/basicio.hpp bigtiffimage.cpp bmpimage.cpp ../include/exiv2/bmpimage.hpp @@ -64,7 +63,6 @@ add_library( exiv2lib iptc.cpp ../include/exiv2/iptc.hpp jp2image.cpp ../include/exiv2/jp2image.hpp jpgimage.cpp ../include/exiv2/jpgimage.hpp - matroskavideo.cpp ../include/exiv2/matroskavideo.hpp metadatum.cpp ../include/exiv2/metadatum.hpp mrwimage.cpp ../include/exiv2/mrwimage.hpp orfimage.cpp ../include/exiv2/orfimage.hpp @@ -72,15 +70,12 @@ add_library( exiv2lib preview.cpp ../include/exiv2/preview.hpp properties.cpp ../include/exiv2/properties.hpp psdimage.cpp ../include/exiv2/psdimage.hpp - quicktimevideo.cpp ../include/exiv2/quicktimevideo.hpp rafimage.cpp ../include/exiv2/rafimage.hpp - riffvideo.cpp ../include/exiv2/riffvideo.hpp rw2image.cpp ../include/exiv2/rw2image.hpp tags.cpp ../include/exiv2/tags.hpp tgaimage.cpp ../include/exiv2/tgaimage.hpp tiffimage.cpp ../include/exiv2/tiffimage.hpp types.cpp ../include/exiv2/types.hpp - utilsvideo.cpp ../include/exiv2/utilsvideo.hpp value.cpp ../include/exiv2/value.hpp version.cpp ../include/exiv2/version.hpp webpimage.cpp ../include/exiv2/webpimage.hpp @@ -117,6 +112,16 @@ if( EXIV2_ENABLE_PNG ) target_sources(exiv2lib PRIVATE pngimage.cpp ../include/exiv2/pngimage.hpp) endif() +if( EXIV2_ENABLE_VIDEO ) + target_sources(exiv2lib PRIVATE + asfvideo.cpp ../include/exiv2/asfvideo.hpp + matroskavideo.cpp ../include/exiv2/matroskavideo.hpp + quicktimevideo.cpp ../include/exiv2/quicktimevideo.hpp + riffvideo.cpp ../include/exiv2/riffvideo.hpp + utilsvideo.cpp ../include/exiv2/utilsvideo.hpp + ) +endif() + # Other library target properties # ---------------------------------------------------------