From 1c764358bbcd07658d52eb459c29b4392fc8e28a Mon Sep 17 00:00:00 2001 From: Mohamed Ali Chebbi <56059847+mohamedchebbii@users.noreply.github.com> Date: Wed, 4 Jan 2023 13:01:34 +0100 Subject: [PATCH] Encapsulate video support with compilation variable EXV_ENABLE_VIDEO (#2448) * Encapsulate video support with compilation variable EXV_ENABLE_VIDEO * Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: add variable to unit test files * Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: encapsulate in makefile * Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: fix PR windows matrix * Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: activate only for concerned CI tests * Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: desable for linux release * Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: add to Fuzz PR --- .github/workflows/on_PR_linux_fuzz.yml | 2 +- .github/workflows/on_PR_linux_matrix.yml | 2 +- .../workflows/on_PR_linux_special_builds.yml | 4 ++-- .github/workflows/on_PR_mac_matrix.yml | 2 +- .../workflows/on_PR_mac_special_builds.yml | 2 +- .github/workflows/on_PR_windows_matrix.yml | 4 +++- .github/workflows/on_push_BasicWinLinMac.yml | 6 +++--- .../workflows/on_push_ExtraJobsForMain.yml | 2 +- CMakeLists.txt | 1 + CMakePresets.json | 4 +++- README.md | 3 ++- cmake/config.h.cmake | 3 +++ cmake/generateConfigFile.cmake | 1 + cmake/printSummary.cmake | 1 + contrib/vs2019/solution/exv_conf.h | 3 +++ src/CMakeLists.txt | 20 ++++++++++++------- src/asfvideo.cpp | 2 -- src/image.cpp | 18 ++++++++++------- src/matroskavideo.cpp | 3 +-- src/quicktimevideo.cpp | 2 +- src/riffvideo.cpp | 3 --- src/version.cpp | 6 ++++++ unitTests/CMakeLists.txt | 9 ++++++--- 23 files changed, 65 insertions(+), 38 deletions(-) diff --git a/.github/workflows/on_PR_linux_fuzz.yml b/.github/workflows/on_PR_linux_fuzz.yml index 490f33a2..0a7de672 100644 --- a/.github/workflows/on_PR_linux_fuzz.yml +++ b/.github/workflows/on_PR_linux_fuzz.yml @@ -28,7 +28,7 @@ jobs: - name: build and compile run: | - cmake --preset linux-sanitizers -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=$(which clang++) -DEXIV2_BUILD_FUZZ_TESTS=ON -DEXIV2_BUILD_UNIT_TESTS=OFF + cmake --preset linux-sanitizers -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=$(which clang++) -DEXIV2_BUILD_FUZZ_TESTS=ON -DEXIV2_BUILD_UNIT_TESTS=OFF -DEXIV2_ENABLE_VIDEO=ON cmake --build build --parallel - name: Fuzz diff --git a/.github/workflows/on_PR_linux_matrix.yml b/.github/workflows/on_PR_linux_matrix.yml index 15ee5168..6f970e07 100644 --- a/.github/workflows/on_PR_linux_matrix.yml +++ b/.github/workflows/on_PR_linux_matrix.yml @@ -43,7 +43,7 @@ jobs: - name: Build run: | - cmake --preset base_linux -S . -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} + cmake --preset base_linux -S . -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} -DEXIV2_ENABLE_VIDEO=ON cmake --build build-base_linux --parallel - name: Install diff --git a/.github/workflows/on_PR_linux_special_builds.yml b/.github/workflows/on_PR_linux_special_builds.yml index 778cf089..1fcd0794 100644 --- a/.github/workflows/on_PR_linux_special_builds.yml +++ b/.github/workflows/on_PR_linux_special_builds.yml @@ -41,7 +41,7 @@ jobs: - name: Build run: | - cmake --preset linux-coverage -S . -B build + cmake --preset linux-coverage -S . -B build -DEXIV2_ENABLE_VIDEO=ON cmake --build build --parallel - name: Tests + Upload coverage @@ -121,7 +121,7 @@ jobs: - name: Build run: | - cmake --preset linux-sanitizers -S . -B build + cmake --preset linux-sanitizers -S . -B build -DEXIV2_ENABLE_VIDEO=ON cmake --build build --parallel - name: Tests diff --git a/.github/workflows/on_PR_mac_matrix.yml b/.github/workflows/on_PR_mac_matrix.yml index a561a4e3..c2c6ebb2 100644 --- a/.github/workflows/on_PR_mac_matrix.yml +++ b/.github/workflows/on_PR_mac_matrix.yml @@ -38,7 +38,7 @@ jobs: - name: Build run: | - cmake --preset base_mac -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" + cmake --preset base_mac -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" -DEXIV2_ENABLE_VIDEO=ON cmake --build build --parallel - name: Install diff --git a/.github/workflows/on_PR_mac_special_builds.yml b/.github/workflows/on_PR_mac_special_builds.yml index 88ef1e90..63e9f3cd 100644 --- a/.github/workflows/on_PR_mac_special_builds.yml +++ b/.github/workflows/on_PR_mac_special_builds.yml @@ -33,7 +33,7 @@ jobs: - name: Build run: | - cmake --preset base_mac -S . -B build -DEXIV2_TEAM_USE_SANITIZERS=ON + cmake --preset base_mac -S . -B build -DEXIV2_TEAM_USE_SANITIZERS=ON -DEXIV2_ENABLE_VIDEO=ON cmake --build build --parallel - name: Tests diff --git a/.github/workflows/on_PR_windows_matrix.yml b/.github/workflows/on_PR_windows_matrix.yml index f9a345fc..488ac3c3 100644 --- a/.github/workflows/on_PR_windows_matrix.yml +++ b/.github/workflows/on_PR_windows_matrix.yml @@ -78,7 +78,7 @@ jobs: - name: Build run: | - cmake --preset base_windows -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} + cmake --preset base_windows -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} -DEXIV2_ENABLE_VIDEO=ON cmake --build build --parallel - name: Install @@ -138,6 +138,7 @@ jobs: -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} \ -DCONAN_AUTO_INSTALL=OFF \ -DCMAKE_CXX_FLAGS=-Wno-deprecated \ + -DEXIV2_ENABLE_VIDEO=ON \ -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF cmake --build build --parallel @@ -205,6 +206,7 @@ jobs: -DEXIV2_ENABLE_WEBREADY=ON \ -DEXIV2_ENABLE_CURL=ON \ -DEXIV2_ENABLE_BMFF=ON \ + -DEXIV2_ENABLE_VIDEO=ON \ -DEXIV2_BUILD_UNIT_TESTS=OFF \ -S . -B build && \ cmake --build build --parallel diff --git a/.github/workflows/on_push_BasicWinLinMac.yml b/.github/workflows/on_push_BasicWinLinMac.yml index ac141220..036c6268 100644 --- a/.github/workflows/on_push_BasicWinLinMac.yml +++ b/.github/workflows/on_push_BasicWinLinMac.yml @@ -54,7 +54,7 @@ jobs: - name: Build run: | - cmake --preset win-release -S . -B build + cmake --preset win-release -S . -B build -DEXIV2_ENABLE_VIDEO=ON cmake --build build --parallel @@ -85,7 +85,7 @@ jobs: - name: build and compile run: | - cmake --preset linux-release-NoConan -S . -B build + cmake --preset linux-release-NoConan -S . -B build -DEXIV2_ENABLE_VIDEO=ON cmake --build build --parallel - name: Test @@ -115,7 +115,7 @@ jobs: - name: build and compile run: | - cmake --preset base_mac -S . -B build -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" + cmake --preset base_mac -S . -B build -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" -DEXIV2_ENABLE_VIDEO=ON cmake --build build --parallel - name: Test diff --git a/.github/workflows/on_push_ExtraJobsForMain.yml b/.github/workflows/on_push_ExtraJobsForMain.yml index 03f18db9..b14f9f27 100644 --- a/.github/workflows/on_push_ExtraJobsForMain.yml +++ b/.github/workflows/on_push_ExtraJobsForMain.yml @@ -42,7 +42,7 @@ jobs: - name: Build run: | - cmake --preset linux-coverage -S . -B build + cmake --preset linux-coverage -S . -B build -DEXIV2_ENABLE_VIDEO=ON cmake --build build - name: Tests + Upload coverage diff --git a/CMakeLists.txt b/CMakeLists.txt index adb3ea38..2bc05787 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,7 @@ option( EXIV2_ENABLE_WEBREADY "Build webready support into library" option( EXIV2_ENABLE_CURL "Use libcurl for HttpIo (WEBREADY)" OFF ) option( EXIV2_ENABLE_BMFF "Build with BMFF support" ON ) option( EXIV2_ENABLE_BROTLI "Use Brotli for JPEG XL compressed boxes (BMFF)" ON ) +option( EXIV2_ENABLE_VIDEO "Build with video support" OFF ) option( EXIV2_BUILD_SAMPLES "Build sample applications" OFF ) option( EXIV2_BUILD_EXIV2_COMMAND "Build exiv2 command-line executable" ON ) diff --git a/CMakePresets.json b/CMakePresets.json index 045053c8..fcef1538 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -18,7 +18,8 @@ "EXIV2_ENABLE_BMFF": true, "EXIV2_BUILD_UNIT_TESTS": true, "EXIV2_TEAM_WARNINGS_AS_ERRORS": true, - "EXIV2_ENABLE_NLS": false + "EXIV2_ENABLE_NLS": false, + "EXIV2_ENABLE_VIDEO": false } }, { @@ -141,6 +142,7 @@ "inherits": "linux-release-NoConan", "cacheVariables": { "EXIV2_ENABLE_NLS": true, + "EXIV2_ENABLE_VIDEO": false, "EXIV2_BUILD_DOC": true } } diff --git a/README.md b/README.md index 3c0c7aa8..2a7fe04b 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,7 @@ Preset CMake variables: EXIV2_ENABLE_BMFF:BOOL="TRUE" EXIV2_ENABLE_CURL:BOOL="TRUE" EXIV2_ENABLE_NLS:BOOL="FALSE" + EXIV2_ENABLE_VIDEO:BOOL="FALSE" EXIV2_ENABLE_PNG:BOOL="TRUE" EXIV2_ENABLE_WEBREADY:BOOL="TRUE" EXIV2_TEAM_WARNINGS_AS_ERRORS:BOOL="TRUE" @@ -986,7 +987,7 @@ Except for the `unitTests`, CMake needs to find a python3 interpreter in the sy | Name | Language | Location | Command
_(in build directory)_ | CMake Option to Build | |:-- |:-- |:-- |:-- |:-- | | bashTests | python | tests/bash_tests | $ ctest -R bash | -DEXIV2_BUILD_SAMPLES=ON | -| bugfixTests | python | tests/bugfixes | $ ctest -R bugfix | | +| bugfixTests | python | tests/bugfixes | $ ctest -R bugfix | -DEXIV2_ENBALE_VIDEO=ON | | lensTest | C++ | tests/lens_tests | $ ctest -R lens | | | tiffTests | python | tests/tiff_test | $ ctest -R tiff | | | unitTests | C++ | unitTests/ | $ ctest -R unit | -DEXIV2_BUILD_UNIT_TESTS=ON | diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index 50f39613..8d892b32 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -15,6 +15,9 @@ // Define if you want translation of program messages to the user's native language #cmakedefine EXV_ENABLE_NLS +// Define if you want to enable the decoding of video metadata +#cmakedefine EXV_ENABLE_VIDEO + // Define if you want BMFF support. #cmakedefine EXV_ENABLE_BMFF diff --git a/cmake/generateConfigFile.cmake b/cmake/generateConfigFile.cmake index 81081b5a..8047b472 100644 --- a/cmake/generateConfigFile.cmake +++ b/cmake/generateConfigFile.cmake @@ -40,5 +40,6 @@ check_include_file_cxx( "unistd.h" EXV_HAVE_UNISTD_H ) check_include_file_cxx( "sys/mman.h" EXV_HAVE_SYS_MMAN_H ) set(EXV_ENABLE_NLS ${EXIV2_ENABLE_NLS}) +set(EXV_ENABLE_VIDEO ${EXIV2_ENABLE_VIDEO}) configure_file(cmake/config.h.cmake ${CMAKE_BINARY_DIR}/exv_conf.h @ONLY) diff --git a/cmake/printSummary.cmake b/cmake/printSummary.cmake index 2d8ea478..7c453d5b 100644 --- a/cmake/printSummary.cmake +++ b/cmake/printSummary.cmake @@ -53,6 +53,7 @@ endif() OptionOutput( "Building BMFF support: " EXIV2_ENABLE_BMFF ) OptionOutput( "Brotli support for JPEG XL: " EXIV2_ENABLE_BMFF AND BROTLI_FOUND ) OptionOutput( "Native language support: " EXIV2_ENABLE_NLS ) +OptionOutput( "Building video support: " EXIV2_ENABLE_VIDEO ) OptionOutput( "Nikon lens database: " EXIV2_ENABLE_LENSDATA ) OptionOutput( "Building webready support: " EXIV2_ENABLE_WEBREADY ) if ( EXIV2_ENABLE_WEBREADY ) diff --git a/contrib/vs2019/solution/exv_conf.h b/contrib/vs2019/solution/exv_conf.h index fa10c3ad..c1683c40 100644 --- a/contrib/vs2019/solution/exv_conf.h +++ b/contrib/vs2019/solution/exv_conf.h @@ -18,6 +18,9 @@ // Define if you want translation of program messages to the user's native language #define EXV_ENABLE_NLS +// Define if you want to support video metadata +#define EXV_ENABLE_VIDEO + // Define if you have the strerror_r function. /* #undef EXV_HAVE_STRERROR_R */ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 932c0aab..df299fec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,7 +39,6 @@ add_library( exiv2lib_int OBJECT ) set(PUBLIC_HEADERS - ../include/exiv2/asfvideo.hpp ../include/exiv2/basicio.hpp ../include/exiv2/bmffimage.hpp ../include/exiv2/bmpimage.hpp @@ -61,7 +60,6 @@ set(PUBLIC_HEADERS ../include/exiv2/iptc.hpp ../include/exiv2/jp2image.hpp ../include/exiv2/jpgimage.hpp - ../include/exiv2/matroskavideo.hpp ../include/exiv2/metadatum.hpp ../include/exiv2/mrwimage.hpp ../include/exiv2/orfimage.hpp @@ -71,7 +69,6 @@ set(PUBLIC_HEADERS ../include/exiv2/properties.hpp ../include/exiv2/psdimage.hpp ../include/exiv2/rafimage.hpp - ../include/exiv2/riffvideo.hpp ../include/exiv2/rw2image.hpp ../include/exiv2/slice.hpp ../include/exiv2/tags.hpp @@ -83,7 +80,6 @@ set(PUBLIC_HEADERS ../include/exiv2/webpimage.hpp ../include/exiv2/xmp_exiv2.hpp ../include/exiv2/xmpsidecar.hpp - ../include/exiv2/quicktimevideo.hpp ) add_library( exiv2lib @@ -107,7 +103,6 @@ add_library( exiv2lib iptc.cpp jp2image.cpp jpgimage.cpp - matroskavideo.cpp metadatum.cpp mrwimage.cpp orfimage.cpp @@ -117,7 +112,6 @@ add_library( exiv2lib properties.cpp psdimage.cpp rafimage.cpp - riffvideo.cpp rw2image.cpp tags.cpp tgaimage.cpp @@ -128,7 +122,6 @@ add_library( exiv2lib webpimage.cpp xmp.cpp xmpsidecar.cpp - quicktimevideo.cpp ${PUBLIC_HEADERS} $ ) @@ -148,6 +141,19 @@ if( EXIV2_ENABLE_PNG ) target_sources(exiv2lib PRIVATE pngimage.cpp ../include/exiv2/pngimage.hpp) endif() +if( EXV_ENABLE_VIDEO ) + set(PUBLIC_HEADERS ${PUBLIC_HEADERS} ../include/exiv2/asfvideo.hpp) + target_sources(exiv2lib PRIVATE asfvideo.cpp ../include/exiv2/asfvideo.hpp) + + set(PUBLIC_HEADERS ${PUBLIC_HEADERS} ../include/exiv2/matroskavideo.hpp) + target_sources(exiv2lib PRIVATE matroskavideo.cpp ../include/exiv2/matroskavideo.hpp) + + set(PUBLIC_HEADERS ${PUBLIC_HEADERS} ../include/exiv2/quicktimevideo.hpp) + target_sources(exiv2lib PRIVATE quicktimevideo.cpp ../include/exiv2/quicktimevideo.hpp) + + set(PUBLIC_HEADERS ${PUBLIC_HEADERS} ../include/exiv2/riffvideo.hpp) + target_sources(exiv2lib PRIVATE riffvideo.cpp ../include/exiv2/riffvideo.hpp) +endif() # Other library target properties # --------------------------------------------------------- diff --git a/src/asfvideo.cpp b/src/asfvideo.cpp index 12763d02..44860b72 100644 --- a/src/asfvideo.cpp +++ b/src/asfvideo.cpp @@ -28,7 +28,6 @@ #include #include "config.h" -// #ifdef EXV_ENABLE_VIDEO #include "asfvideo.hpp" #include "basicio.hpp" #include "convert.hpp" @@ -713,4 +712,3 @@ bool isAsfType(BasicIo& iIo, bool advance) { } } // namespace Exiv2 - // #endif // EXV_ENABLE_VIDEO diff --git a/src/image.cpp b/src/image.cpp index 34f3009d..6f648a9d 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -14,7 +14,7 @@ #ifdef EXV_ENABLE_BMFF #include "bmffimage.hpp" #endif // EXV_ENABLE_BMFF -#include "asfvideo.hpp" + #include "cr2image.hpp" #include "crwimage.hpp" #include "epsimage.hpp" @@ -26,20 +26,23 @@ #include "bmpimage.hpp" #include "gifimage.hpp" #include "jp2image.hpp" -#include "matroskavideo.hpp" #include "nikonmn_int.hpp" #include "orfimage.hpp" #include "pgfimage.hpp" #include "psdimage.hpp" -#include "quicktimevideo.hpp" #include "rafimage.hpp" -#include "riffvideo.hpp" #include "rw2image.hpp" #include "tags_int.hpp" #include "tgaimage.hpp" #include "tiffimage.hpp" #include "webpimage.hpp" #include "xmpsidecar.hpp" +#ifdef EXV_ENABLE_VIDEO +#include "asfvideo.hpp" +#include "matroskavideo.hpp" +#include "quicktimevideo.hpp" +#include "riffvideo.hpp" +#endif // EXV_ENABLE_VIDEO // + standard includes #include @@ -100,13 +103,14 @@ constexpr auto registry = std::array{ Registry{ImageType::tga, newTgaInstance, isTgaType, amNone, amNone, amNone, amNone}, Registry{ImageType::bmp, newBmpInstance, isBmpType, amNone, amNone, amNone, amNone}, Registry{ImageType::jp2, newJp2Instance, isJp2Type, amReadWrite, amReadWrite, amReadWrite, amNone}, - // needs to be before bmff because some ftyp files are handled as qt and - // the rest should fall through to bmff +// needs to be before bmff because some ftyp files are handled as qt and +// the rest should fall through to bmff +#ifdef EXV_ENABLE_VIDEO Registry{ImageType::qtime, newQTimeInstance, isQTimeType, amRead, amNone, amRead, amNone}, Registry{ImageType::asf, newAsfInstance, isAsfType, amRead, amNone, amRead, amNone}, Registry{ImageType::riff, newRiffInstance, isRiffType, amRead, amNone, amRead, amNone}, Registry{ImageType::mkv, newMkvInstance, isMkvType, amRead, amNone, amRead, amNone}, - +#endif // EXV_ENABLE_VIDEO #ifdef EXV_ENABLE_BMFF Registry{ImageType::bmff, newBmffInstance, isBmffType, amRead, amRead, amRead, amNone}, #endif // EXV_ENABLE_BMFF diff --git a/src/matroskavideo.cpp b/src/matroskavideo.cpp index 182bd27b..da2960a1 100644 --- a/src/matroskavideo.cpp +++ b/src/matroskavideo.cpp @@ -21,7 +21,6 @@ // included header files #include "config.h" -// #ifdef EXV_ENABLE_VIDEO #include "basicio.hpp" #include "error.hpp" #include "futils.hpp" @@ -970,4 +969,4 @@ bool isMkvType(BasicIo& iIo, bool advance) { return result; } -} // namespace Exiv2 +} // namespace Exiv2 \ No newline at end of file diff --git a/src/quicktimevideo.cpp b/src/quicktimevideo.cpp index 6ebc249f..3eb17a04 100644 --- a/src/quicktimevideo.cpp +++ b/src/quicktimevideo.cpp @@ -1613,4 +1613,4 @@ bool isQTimeType(BasicIo& iIo, bool advance) { return matched; } -} // namespace Exiv2 +} // namespace Exiv2 \ No newline at end of file diff --git a/src/riffvideo.cpp b/src/riffvideo.cpp index fae508a9..06342287 100644 --- a/src/riffvideo.cpp +++ b/src/riffvideo.cpp @@ -21,7 +21,6 @@ // included header files #include "config.h" -// #ifdef EXV_ENABLE_VIDEO #include "basicio.hpp" #include "error.hpp" #include "futils.hpp" @@ -1252,6 +1251,4 @@ bool isRiffType(BasicIo& iIo, bool advance) { } return matched; } - } // namespace Exiv2 - // #endif // EXV_ENABLE_VIDEO diff --git a/src/version.cpp b/src/version.cpp index ab063b87..0961e7d7 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -309,6 +309,7 @@ void Exiv2::dumpLibraryInfo(std::ostream& os, const std::vector& key int enable_bmff = 0; int enable_webready = 0; int enable_nls = 0; + int enable_video = 0; int use_curl = 0; #ifdef EXV_HAVE_INTTYPES_H @@ -421,6 +422,10 @@ void Exiv2::dumpLibraryInfo(std::ostream& os, const std::vector& key enable_nls = 1; #endif +#ifdef EXV_ENABLE_VIDEO + enable_video = 1; +#endif + #ifdef EXV_USE_CURL use_curl = 1; #endif @@ -487,6 +492,7 @@ void Exiv2::dumpLibraryInfo(std::ostream& os, const std::vector& key output(os, keys, "enable_bmff", enable_bmff); output(os, keys, "enable_webready", enable_webready); output(os, keys, "enable_nls", enable_nls); + output(os, keys, "enable_video", enable_video); output(os, keys, "use_curl", use_curl); output(os, keys, "config_path", Exiv2::Internal::getExiv2ConfigPath()); diff --git a/unitTests/CMakeLists.txt b/unitTests/CMakeLists.txt index 5ff39618..74d52f51 100644 --- a/unitTests/CMakeLists.txt +++ b/unitTests/CMakeLists.txt @@ -1,8 +1,12 @@ find_package(GTest REQUIRED) +# video support. +if( EXV_ENABLE_VIDEO ) + set(VIDEO_SUPPORT test_asfvideo.cpp test_matroskavideo.cpp test_riffVideo.cpp) +endif() + add_executable(unit_tests mainTestRunner.cpp - test_asfvideo.cpp test_basicio.cpp test_bmpimage.cpp test_cr2header_int.cpp @@ -19,7 +23,6 @@ add_executable(unit_tests test_jp2image_int.cpp test_IptcKey.cpp test_LangAltValueRead.cpp - test_matroskavideo.cpp test_Photoshop.cpp test_pngimage.cpp test_safe_op.cpp @@ -27,9 +30,9 @@ add_executable(unit_tests test_tiffheader.cpp test_types.cpp test_TimeValue.cpp - test_riffVideo.cpp test_utils.cpp test_XmpKey.cpp + ${VIDEO_SUPPORT} $ )