diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e57478b..adb3ea38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,13 +22,14 @@ include(cmake/mainSetup.cmake REQUIRED) option( BUILD_SHARED_LIBS "Build exiv2lib as a shared library" ON ) option( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON ) option( EXIV2_ENABLE_EXTERNAL_XMP "Use external version of XMP" OFF ) -option( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON ) +option( EXIV2_ENABLE_PNG "Build with PNG support (requires zlib)" ON ) option( EXIV2_ENABLE_NLS "Build native language support (requires gettext)" OFF ) -option( EXIV2_ENABLE_LENSDATA "Build including lens data" ON ) +option( EXIV2_ENABLE_LENSDATA "Build including Nikon lens data" ON ) option( EXIV2_ENABLE_DYNAMIC_RUNTIME "Use dynamic runtime (used for static libs)" ON ) option( EXIV2_ENABLE_WEBREADY "Build webready support into library" OFF ) -option( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo (WEBREADY)" OFF ) -option( EXIV2_ENABLE_BMFF "Build with BMFF support (brotli recommended)" ON ) +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_BUILD_SAMPLES "Build sample applications" OFF ) option( EXIV2_BUILD_EXIV2_COMMAND "Build exiv2 command-line executable" ON ) diff --git a/README.md b/README.md index 6d256e73..2dff350b 100644 --- a/README.md +++ b/README.md @@ -246,12 +246,13 @@ Options defined at `exiv2/CMakeLists.txt` include: ```bash 576 rmills@rmillsmm:~/gnu/github/exiv2/exiv2 $ grep ^option CMakeLists.txt -option( BUILD_SHARED_LIBS "Build exiv2lib as a shared library" ON ) -option( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON ) -option( EXIV2_ENABLE_EXTERNAL_XMP "Use external version of XMP" OFF ) -option( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON ) +option( BUILD_SHARED_LIBS "Build exiv2lib as a shared library" ON ) +option( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON ) +option( EXIV2_ENABLE_EXTERNAL_XMP "Use external version of XMP" OFF ) +option( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON ) ... -option( EXIV2_ENABLE_BMFF "Build with BMFF support (brotli recommended)" ON ) +option( EXIV2_ENABLE_BMFF "Build with BMFF support (brotli recommended)" ON ) +option( EXIV2_ENABLE_BROTLI "Use Brotli for JPEG XL compressed boxes (BMFF)" ON ) 577 rmills@rmillsmm:~/gnu/github/exiv2/exiv2 $ ``` @@ -268,13 +269,13 @@ $ cmake -DBUILD_SHARED_LIBS=ON -DEXIV2_ENABLE_NLS=OFF The following Exiv2 features require external libraries: -| Feature | Package | Default | To change default | Availability | -|:------------------------ |:-------- |:-------:| :------------------------|:----------- | -| PNG image support | zlib | ON | -DEXIV2\_ENABLE\_PNG=OFF | [http://zlib.net/](http://zlib.net/) | -| XMP support | expat | ON | -DEXIV2\_ENABLE\_XMP=OFF | [http://expat.sourceforge.net](http://expat.sourceforge.net)/
Use _**Expat 2.2.6**_ and later | -| Natural language system | gettext | OFF | -DEXIV2\_ENABLE\_NLS=ON | [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) | -| Character set conversion | libiconv | | Disabled for Visual Studio.
Linked when installed on UNIX like platforms. | [https://www.gnu.org/software/libiconv/](https://www.gnu.org/software/libiconv/) | -| JPEG XL brob support | brotli | | Linked when installed and -DEXIV2\_ENABLE\_BMFF=ON | [https://github.com/google/brotli](https://github.com/google/brotli) | +| Feature | Package | Default | To change default | Availability | +|:------------------------ |:-------- |:-------:|:--------------------------- |:------------ | +| PNG image support | zlib | ON | -DEXIV2\_ENABLE\_PNG=OFF | [http://zlib.net/](http://zlib.net/) | +| XMP support | expat | ON | -DEXIV2\_ENABLE\_XMP=OFF | [http://expat.sourceforge.net](http://expat.sourceforge.net)/
Use _**Expat 2.2.6**_ and later | +| Natural language system | gettext | OFF | -DEXIV2\_ENABLE\_NLS=ON | [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) | +| JPEG XL brob support | brotli | ON | -DEXIV2\_ENABLE\_BROTLI=OFF | [https://github.com/google/brotli](https://github.com/google/brotli) | +| Character set conversion | libiconv | | Disabled for Visual Studio.
Linked when installed on UNIX like platforms. | [https://www.gnu.org/software/libiconv/](https://www.gnu.org/software/libiconv/) | On UNIX systems, you may install the dependencies using the distribution's package management system. Install the development package of a dependency to install the header files and libraries required to build Exiv2. The script diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake index 67b6f494..2effaeef 100644 --- a/cmake/findDependencies.cmake +++ b/cmake/findDependencies.cmake @@ -1,20 +1,20 @@ if (CONAN_AUTO_INSTALL) - # Download automatically the cmake-conan integration file - if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake") - message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan") - file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake" - "${CMAKE_BINARY_DIR}/conan.cmake" - TLS_VERIFY ON) - endif() + # Download automatically the cmake-conan integration file + if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake") + message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan") + file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake" + "${CMAKE_BINARY_DIR}/conan.cmake" + TLS_VERIFY ON) + endif() - include(${CMAKE_BINARY_DIR}/conan.cmake) + include(${CMAKE_BINARY_DIR}/conan.cmake) - conan_cmake_autodetect(settings) - conan_cmake_install(PATH_OR_REFERENCE .. - BUILD missing - REMOTE conancenter - OPTIONS webready=True - SETTINGS ${settings}) + conan_cmake_autodetect(settings) + conan_cmake_install(PATH_OR_REFERENCE .. + BUILD missing + REMOTE conancenter + OPTIONS webready=True + SETTINGS ${settings}) endif() if (APPLE) @@ -39,15 +39,15 @@ find_package(Filesystem REQUIRED) # don't use Frameworks on the Mac (#966) if (APPLE) - set(CMAKE_FIND_FRAMEWORK NEVER) + set(CMAKE_FIND_FRAMEWORK NEVER) endif() if( EXIV2_ENABLE_PNG ) find_package( ZLIB REQUIRED ) endif( ) -if( EXIV2_ENABLE_BMFF ) - find_package( Brotli ) +if( EXIV2_ENABLE_BMFF AND EXIV2_ENABLE_BROTLI ) + find_package( Brotli REQUIRED ) endif( ) if( EXIV2_ENABLE_WEBREADY ) @@ -72,8 +72,8 @@ endif( ) find_package(Iconv) if( ICONV_FOUND ) - message ( "-- ICONV_INCLUDE_DIR : " ${Iconv_INCLUDE_DIR} ) - message ( "-- ICONV_LIBRARIES : " ${Iconv_LIBRARY} ) + message ( "-- Iconv_INCLUDE_DIRS : " ${Iconv_INCLUDE_DIRS} ) + message ( "-- Iconv_LIBRARIES : " ${Iconv_LIBRARIES} ) endif() if( BUILD_WITH_CCACHE ) @@ -84,4 +84,3 @@ if( BUILD_WITH_CCACHE ) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) endif() endif() - diff --git a/cmake/printSummary.cmake b/cmake/printSummary.cmake index b58e9729..2d8ea478 100644 --- a/cmake/printSummary.cmake +++ b/cmake/printSummary.cmake @@ -38,36 +38,34 @@ message( STATUS "RelWithDebInfo: ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}" ) message( STATUS "MinSizeRel: ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL}" ) message( STATUS "" ) message( STATUS "Compiler Options") -OptionOutput( "Warnings as errors: " EXIV2_TEAM_WARNINGS_AS_ERRORS ) -OptionOutput( "Use extra compiler warning flags: " EXIV2_TEAM_EXTRA_WARNINGS ) +OptionOutput( "Warnings as errors: " EXIV2_TEAM_WARNINGS_AS_ERRORS ) +OptionOutput( "Use extra compiler warning flags: " EXIV2_TEAM_EXTRA_WARNINGS ) message( STATUS "" ) -message( STATUS "------------------------------------------------------------------" ) -OptionOutput( "Building shared library: " BUILD_SHARED_LIBS ) -OptionOutput( "Building PNG support: " EXIV2_ENABLE_PNG AND ZLIB_FOUND ) +message( STATUS "------------------------------------------------------------------" ) +OptionOutput( "Building shared library: " BUILD_SHARED_LIBS ) +OptionOutput( "Building PNG support: " EXIV2_ENABLE_PNG AND ZLIB_FOUND ) if ( EXIV2_ENABLE_EXTERNAL_XMP ) - OptionOutput( "XMP metadata support (EXTERNAL): " EXIV2_ENABLE_EXTERNAL_XMP ) + OptionOutput( "XMP metadata support (EXTERNAL): " EXIV2_ENABLE_EXTERNAL_XMP ) else() - OptionOutput( "XMP metadata support: " EXIV2_ENABLE_XMP ) + OptionOutput( "XMP metadata support: " EXIV2_ENABLE_XMP ) endif() -OptionOutput( "Building BMFF support: " EXIV2_ENABLE_BMFF ) -if ( EXIV2_ENABLE_BMFF ) - OptionOutput( "Brotli support for JPEG XL: " BROTLI_FOUND ) -endif() -OptionOutput( "Native language support: " EXIV2_ENABLE_NLS ) -OptionOutput( "Nikon lens database: " EXIV2_ENABLE_LENSDATA ) -OptionOutput( "Building webready support: " EXIV2_ENABLE_WEBREADY ) +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( "Nikon lens database: " EXIV2_ENABLE_LENSDATA ) +OptionOutput( "Building webready support: " EXIV2_ENABLE_WEBREADY ) if ( EXIV2_ENABLE_WEBREADY ) - OptionOutput( "USE Libcurl for HttpIo: " EXIV2_ENABLE_CURL ) + OptionOutput( "USE Libcurl for HttpIo: " EXIV2_ENABLE_CURL ) endif ( EXIV2_ENABLE_WEBREADY ) if (WIN32) - OptionOutput( "Dynamic runtime override: " EXIV2_ENABLE_DYNAMIC_RUNTIME) + OptionOutput( "Dynamic runtime override: " EXIV2_ENABLE_DYNAMIC_RUNTIME ) endif() -OptionOutput( "Building exiv2 command: " EXIV2_BUILD_EXIV2_COMMAND ) -OptionOutput( "Building samples: " EXIV2_BUILD_SAMPLES ) -OptionOutput( "Building unit tests: " EXIV2_BUILD_UNIT_TESTS ) -OptionOutput( "Building fuzz tests: " EXIV2_BUILD_FUZZ_TESTS ) -OptionOutput( "Building doc: " EXIV2_BUILD_DOC ) -OptionOutput( "Building with coverage flags: " BUILD_WITH_COVERAGE ) -OptionOutput( "Using ccache: " BUILD_WITH_CCACHE ) +OptionOutput( "Building exiv2 command: " EXIV2_BUILD_EXIV2_COMMAND ) +OptionOutput( "Building samples: " EXIV2_BUILD_SAMPLES ) +OptionOutput( "Building unit tests: " EXIV2_BUILD_UNIT_TESTS ) +OptionOutput( "Building fuzz tests: " EXIV2_BUILD_FUZZ_TESTS ) +OptionOutput( "Building doc: " EXIV2_BUILD_DOC ) +OptionOutput( "Building with coverage flags: " BUILD_WITH_COVERAGE ) +OptionOutput( "Using ccache: " BUILD_WITH_CCACHE )