diff --git a/README.md b/README.md index 6aeb2f1837..a9e76838ec 100644 --- a/README.md +++ b/README.md @@ -196,7 +196,8 @@ Preset CMake variables: # CMake finds the project dependencies which were automatically handled by conan -- Conan: Using autogenerated FindZLIB.cmake --- Library zlib found C:/Users/luis/.conan/data/zlib/1.2.11/_/_/package/-- Conan: Using autogenerated FindCURL.cmake +-- Library zlib found C:/Users/luis/.conan/data/zlib/1.2.11/_/_/package/ +-- Conan: Using autogenerated FindCURL.cmake -- Library libcurl_imp found C:/Users/luis/.conan/data/libcurl/7.79.0/_/_/package/ ... @@ -245,12 +246,12 @@ 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" ON ) +option( EXIV2_ENABLE_BMFF "Build with BMFF support (brotli recommended)" ON ) 577 rmills@rmillsmm:~/gnu/github/exiv2/exiv2 $ ``` @@ -267,12 +268,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/) | +| 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) | 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 @@ -1214,7 +1216,7 @@ Update your system and install the build tools and dependencies (zlib, expat, gt ```bash $ sudo apt --yes update -$ sudo apt install --yes build-essential git clang ccache python3 libxml2-utils cmake python3 libexpat1-dev libz-dev zlib1g-dev libssh-dev libcurl4-openssl-dev libgtest-dev google-mock +$ sudo apt install --yes build-essential git clang ccache python3 libxml2-utils cmake python3 libexpat1-dev libz-dev zlib1g-dev libbrotli-dev libssh-dev libcurl4-openssl-dev libgtest-dev google-mock ``` For users of other platforms, the script /ci/install_dependencies.sh has code used to configure many platforms. The code in that file is a useful guide to configuring your platform. @@ -1247,23 +1249,23 @@ I recommend that you build and install CMake from source. ## MinGW/msys2 -Please note that the platform MinGW/msys2 32 is obsolete and superceded by MinGW/msys2 64. It is important to highlight that we rely on using the Universal C Runtime (UCRT) and its relatively new support for UTF-8. Check this [PR](https://github.com/Exiv2/exiv2/pull/2090) for more information. Therefore you will need to use the [URCT MSYS environment](https://www.msys2.org/docs/environments/). +Please note that the 32bit MinGW platform is obsolete and superceded by the 64bit MSYS2 distribution. It is important to highlight that we rely on using the Universal C Runtime (UCRT) and its relatively new support for UTF-8. Check this [PR](https://github.com/Exiv2/exiv2/pull/2090) for more information. Therefore you will need to use the [MSYS2 URCT64 environment](https://www.msys2.org/docs/environments/). Install the latest version of [MSYS2](https://repo.msys2.org/distrib/msys2-x86_64-latest.exe), and follow the installation instructions available [here](https://www.msys2.org/). -The CI workflow file `.github/workflows/on_PR_windows_matrix.yml` has a build job named `msys2` with instructions showing how to configure Exiv2 on MinGW/msys2. +The CI workflow file `.github/workflows/on_PR_windows_matrix.yml` has a build job named `msys2` with instructions showing how to configure Exiv2 on MSYS2. ### Install exiv2 Dependencies -Please note that you will need to install the `ucrt` package version of the exiv2 dependencies: +Please note that you will need to install the `ucrt-x86_64` package version of the exiv2 dependencies: ```bash -pacman -S mingw-w64-ucrt-x86_64-binutils mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-curl mingw-w64-ucrt-x86_64-expat mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gettext mingw-w64-ucrt-x86_64-gtest mingw-w64-ucrt-x86_64-libiconv mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-zlib +pacman -S mingw-w64-ucrt-x86_64-{brotli,cc,cmake,curl,expat,gettext,gtest,libiconv,libwinpthread,ninja,zlib} ``` ### Download exiv2 from github and build -Use the Windows start menu to open the terminal customized for the UCRT environment: `MSYS2 MinGW UCRT x64`. Then run the following commands to download exiv2, configure the project and build it: +Use the Windows start menu to open the terminal customized for the UCRT64 environment: `MSYS2 MinGW UCRT x64`. Then run the following commands to download exiv2, configure the project and build it: ```bash mkdir -p ~/gnu/github/exiv2 @@ -1271,7 +1273,7 @@ cd ~/gnu/github/exiv2 git clone https://github.com/exiv2/exiv2 cd exiv2 mkdir build && cd build -cmake -G "MSYS Makefiles" +cmake -G Ninja -DCMAKE_CXX_FLAGS=-Wno-deprecated -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON @@ -1282,10 +1284,10 @@ cmake -G "MSYS Makefiles" -DEXIV2_BUILD_UNIT_TESTS=ON .. -cmake --build . --parallel +cmake --build . ``` -The binaries generated at this point can be executed from the MSYS2 UCRT terminal, but they will not run from a Windows Command Prompt or PowerShell. The reason is that the MSYS2 UCRT terminal is properly configured to find some needed DLLs. In case you want to be able to run the generated **exiv2** binary from any Windows terminal, you'll need to deploy the needed DLLs with the application. +The binaries generated at this point can be executed from the MSYS2 UCRT64 terminal, but they will not run from a Windows Command Prompt or PowerShell. The reason is that the MSYS2 UCRT64 terminal is properly configured to find some needed DLLs. In case you want to be able to run the generated **exiv2** binary from any Windows terminal, you'll need to deploy the needed DLLs with the application. [TOC](#TOC)