diff --git a/.github/workflows/on_PR_linux_fuzz.yml b/.github/workflows/on_PR_linux_fuzz.yml index e28a3410..746ce262 100644 --- a/.github/workflows/on_PR_linux_fuzz.yml +++ b/.github/workflows/on_PR_linux_fuzz.yml @@ -24,18 +24,8 @@ jobs: - name: build and compile run: | - mkdir build && cd build && \ - cmake -GNinja -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DCMAKE_CXX_COMPILER=$(which clang++) \ - -DEXIV2_BUILD_FUZZ_TESTS=ON \ - -DEXIV2_TEAM_USE_SANITIZERS=ON \ - .. && \ - cmake --build . --parallel + 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 --build build --parallel - name: Fuzz run: | diff --git a/.github/workflows/on_PR_linux_matrix.yml b/.github/workflows/on_PR_linux_matrix.yml index a3c3e991..454b8b76 100644 --- a/.github/workflows/on_PR_linux_matrix.yml +++ b/.github/workflows/on_PR_linux_matrix.yml @@ -39,20 +39,8 @@ jobs: - name: Build run: | - cd build && \ - cmake -GNinja \ - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ - -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DCMAKE_INSTALL_PREFIX=install \ - .. && \ - cmake --build . --parallel + cmake --preset base_linux -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} + cmake --build build --parallel - name: Install run: | diff --git a/.github/workflows/on_PR_linux_special_builds.yml b/.github/workflows/on_PR_linux_special_builds.yml index 4cceffc3..36bf5ef4 100644 --- a/.github/workflows/on_PR_linux_special_builds.yml +++ b/.github/workflows/on_PR_linux_special_builds.yml @@ -37,21 +37,8 @@ jobs: - name: Build run: | - cd build && \ - cmake -GNinja \ - -DCMAKE_BUILD_TYPE=Debug \ - -DBUILD_SHARED_LIBS=ON \ - -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DBUILD_WITH_COVERAGE=ON \ - -DCMAKE_INSTALL_PREFIX=install \ - .. && \ - cmake --build . --parallel + cmake --preset linux-coverage -S . -B build + cmake --build build --parallel - name: Tests + Upload coverage run: | @@ -78,7 +65,6 @@ jobs: - name: install dependencies run: | - sudo apt-get update sudo apt-get install valgrind ninja-build pip3 install conan==1.45.0 @@ -96,9 +82,8 @@ jobs: - name: Build run: | - cd build - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DEXIV2_ENABLE_PNG=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DBUILD_WITH_COVERAGE=OFF -DCMAKE_INSTALL_PREFIX=install .. - cmake --build . --parallel + cmake --preset linux-release -S . -B build + cmake --build build --parallel - name: Tests with valgrind run: | @@ -132,22 +117,8 @@ jobs: - name: Build run: | - cd build && \ - cmake -GNinja \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DBUILD_WITH_COVERAGE=OFF \ - -DEXIV2_TEAM_USE_SANITIZERS=ON \ - -DCMAKE_INSTALL_PREFIX=install \ - .. && \ - cmake --build . --parallel + cmake --preset linux-sanitizers -S . -B build + cmake --build build --parallel - name: Tests run: | @@ -163,8 +134,7 @@ jobs: - name: install dependencies run: | - sudo apt-get update - sudo apt-get install valgrind doxygen graphviz gettext + sudo apt-get install valgrind doxygen graphviz gettext ninja-build pip3 install conan==1.45.0 - name: Conan common config @@ -181,22 +151,8 @@ jobs: - name: Build run: | - cd build && \ - cmake -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DBUILD_WITH_COVERAGE=ON \ - -DEXIV2_BUILD_DOC=ON \ - -DEXIV2_ENABLE_NLS=ON \ - -DCMAKE_CXX_FLAGS="-DEXIV2_DEBUG_MESSAGES" \ - .. && \ - cmake --build . --parallel + cmake --preset linux-release -S . -B build -DEXIV2_BUILD_DOC=ON -DCMAKE_CXX_FLAGS="-DEXIV2_DEBUG_MESSAGES" + cmake --build build --parallel - name: Generate documentation run: | diff --git a/.github/workflows/on_PR_linux_staticAnalysis.yml b/.github/workflows/on_PR_linux_staticAnalysis.yml index c3c764cb..8d2c7bd4 100644 --- a/.github/workflows/on_PR_linux_staticAnalysis.yml +++ b/.github/workflows/on_PR_linux_staticAnalysis.yml @@ -40,19 +40,7 @@ jobs: - name: Configure run: | - cd build && \ - cmake -DCMAKE_BUILD_TYPE=Debug \ - -DBUILD_SHARED_LIBS=ON \ - -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DBUILD_WITH_COVERAGE=ON \ - -DCMAKE_INSTALL_PREFIX=install \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - .. \ + cmake --preset linux-debug-NoConan -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - name: Static Analysis env: diff --git a/.github/workflows/on_PR_mac_matrix.yml b/.github/workflows/on_PR_mac_matrix.yml index 55bedca1..f1f3df86 100644 --- a/.github/workflows/on_PR_mac_matrix.yml +++ b/.github/workflows/on_PR_mac_matrix.yml @@ -33,21 +33,8 @@ jobs: - name: Build run: | - mkdir build && cd build && \ - cmake -GNinja \ - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ - -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DCMAKE_INSTALL_PREFIX=install \ - -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" \ - .. && \ - cmake --build . --parallel + 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 --build build --parallel - name: Install run: | diff --git a/.github/workflows/on_PR_mac_special_builds.yml b/.github/workflows/on_PR_mac_special_builds.yml index 3b159b07..35158260 100644 --- a/.github/workflows/on_PR_mac_special_builds.yml +++ b/.github/workflows/on_PR_mac_special_builds.yml @@ -28,22 +28,8 @@ jobs: - name: Build run: | - mkdir build && cd build && \ - cmake -GNinja \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DBUILD_WITH_COVERAGE=OFF \ - -DEXIV2_TEAM_USE_SANITIZERS=ON \ - -DCMAKE_INSTALL_PREFIX=install \ - .. && \ - cmake --build . --parallel + cmake --preset base_mac -S . -B build -DEXIV2_TEAM_USE_SANITIZERS=ON + cmake --build build --parallel - name: Tests run: | diff --git a/.github/workflows/on_PR_windows_matrix.yml b/.github/workflows/on_PR_windows_matrix.yml index 13cf3acc..c0034236 100644 --- a/.github/workflows/on_PR_windows_matrix.yml +++ b/.github/workflows/on_PR_windows_matrix.yml @@ -73,23 +73,12 @@ jobs: - name: Build run: | - cmake -GNinja ` - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ` - -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} ` - -DEXIV2_ENABLE_NLS=OFF ` - -DEXIV2_ENABLE_WEBREADY=ON ` - -DEXIV2_ENABLE_BMFF=ON ` - -DEXIV2_BUILD_UNIT_TESTS=ON ` - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON ` - -DCMAKE_INSTALL_PREFIX=install ` - -S . -B build && ` + cmake --preset base_windows -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} cmake --build build --parallel - name: Install run: | - cd build - cmake --install . - tree /f install + cmake --install build - name: Test if: ${{matrix.platform == 'x64'}} @@ -122,26 +111,26 @@ jobs: install: >- base-devel pacboy: >- - toolchain:p + cc:p + gcc-libs:p + libwinpthread:p cmake:p + ninja:p expat:p gettext:p gtest:p libiconv:p zlib:p + curl:p - name: Build run: | - cmake -G"MSYS Makefiles" \ - -DCMAKE_CXX_FLAGS=-Wno-deprecated \ + cmake --preset base_windows -S . -B build \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DEXIV2_ENABLE_NLS=OFF \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -S . -B build && \ + -DCONAN_AUTO_INSTALL=OFF \ + -DCMAKE_CXX_FLAGS=-Wno-deprecated \ + -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF cmake --build build --parallel - name: Test @@ -176,6 +165,7 @@ jobs: gcc-g++ cmake ninja + libcurl-devel libexpat-devel libxml2-devel libxslt-devel @@ -190,6 +180,7 @@ jobs: -DEXIV2_ENABLE_NLS=OFF \ -DEXIV2_ENABLE_WIN_UNICODE=OFF \ -DEXIV2_ENABLE_WEBREADY=ON \ + -DEXIV2_ENABLE_CURL=ON \ -DEXIV2_ENABLE_BMFF=ON \ -DEXIV2_BUILD_UNIT_TESTS=OFF \ -S . -B build && \ diff --git a/.github/workflows/on_push_BasicWinLinMac.yml b/.github/workflows/on_push_BasicWinLinMac.yml index 4ea08930..ad868347 100644 --- a/.github/workflows/on_push_BasicWinLinMac.yml +++ b/.github/workflows/on_push_BasicWinLinMac.yml @@ -48,28 +48,9 @@ jobs: conan profile update settings.compiler.version=17 default conan config set storage.path=$Env:GITHUB_WORKSPACE/conanCache - - name: Run Conan - run: | - md build - cd build - conan profile list - conan install .. --build missing - - name: Build run: | - cmake -GNinja ` - -DCMAKE_BUILD_TYPE=Release ` - -DBUILD_SHARED_LIBS=ON ` - -DEXIV2_BUILD_SAMPLES=ON ` - -DEXIV2_ENABLE_NLS=OFF ` - -DEXIV2_ENABLE_PNG=ON ` - -DEXIV2_ENABLE_WEBREADY=ON ` - -DEXIV2_ENABLE_BMFF=ON ` - -DEXIV2_BUILD_UNIT_TESTS=ON ` - -DEXIV2_ENABLE_WIN_UNICODE=OFF ` - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON ` - -DCMAKE_INSTALL_PREFIX=install .. ` - -S . -B build && ` + cmake --preset win-release -S . -B build cmake --build build --parallel @@ -100,20 +81,8 @@ jobs: - name: build and compile run: | - cd build && \ - cmake -GNinja \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DCMAKE_INSTALL_PREFIX=install \ - .. && \ - cmake --build . --parallel + cmake --preset linux-release-NoConan -S . -B build + cmake --build build --parallel - name: Test run: | @@ -141,21 +110,8 @@ jobs: - name: build and compile run: | - mkdir build && cd build && \ - cmake -GNinja \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DCMAKE_INSTALL_PREFIX=install \ - -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" \ - .. && \ - cmake --build . --parallel + cmake --preset base_mac -S . -B build -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" + cmake --build build --parallel - name: Test run: | diff --git a/.github/workflows/on_push_ExtraJobsForMain.yml b/.github/workflows/on_push_ExtraJobsForMain.yml index f5f9a78e..9099ca4f 100644 --- a/.github/workflows/on_push_ExtraJobsForMain.yml +++ b/.github/workflows/on_push_ExtraJobsForMain.yml @@ -36,20 +36,8 @@ jobs: - name: Build run: | - cd build && \ - cmake -DCMAKE_BUILD_TYPE=Debug \ - -DBUILD_SHARED_LIBS=ON \ - -DEXIV2_ENABLE_PNG=ON \ - -DEXIV2_ENABLE_WEBREADY=ON \ - -DEXIV2_ENABLE_CURL=ON \ - -DEXIV2_BUILD_UNIT_TESTS=ON \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DEXIV2_BUILD_SAMPLES=ON \ - -DBUILD_WITH_COVERAGE=ON \ - -DCMAKE_INSTALL_PREFIX=install \ - .. && \ - cmake --build . + cmake --preset linux-coverage -S . -B build + cmake --build build - name: Tests + Upload coverage run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e399a1b0..0bd8c767 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,16 +39,7 @@ jobs: - name: Build packaged release run: | - cmake -GNinja -S . -B build \ - -DEXIV2_TEAM_PACKAGING=ON \ - -DBUILD_SHARED_LIBS=ON \ - -DEXIV2_ENABLE_WEBREADY=OFF \ - -DEXIV2_ENABLE_NLS=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DEXIV2_ENABLE_BMFF=ON \ - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ - -DEXIV2_BUILD_DOC=ON + cmake --preset linux-all -S . -B build -DEXIV2_TEAM_PACKAGING=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON cmake --build build -t doc cmake --build build -t package @@ -137,16 +128,7 @@ jobs: - name: Build packaged release run: | - cmake -GNinja -S . -B build ` - -DEXIV2_TEAM_PACKAGING=ON ` - -DBUILD_SHARED_LIBS=ON ` - -DEXIV2_ENABLE_WEBREADY=OFF ` - -DEXIV2_ENABLE_NLS=OFF ` - -DCMAKE_BUILD_TYPE=Release ` - -DEXIV2_ENABLE_BMFF=ON ` - -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON ` - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON ` - -DEXIV2_BUILD_DOC=ON + cmake --preset win-release -S . -B build -DEXIV2_TEAM_PACKAGING=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DEXIV2_BUILD_DOC=ON cmake --build build -t doc cmake --build build -t package diff --git a/.gitignore b/.gitignore index c46bd2e7..02b6d1ad 100644 --- a/.gitignore +++ b/.gitignore @@ -25,5 +25,6 @@ doc/html contrib/vms/.vagrant /.vscode .vs/ +CMakeUserPresets.json *cppcheck* diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..045053c8 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,149 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "base_ninja", + "description": "Base preset to use ninja as generator", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-${presetName}", + "installDir": "${sourceDir}/build-${presetName}/install", + "cacheVariables": { + "BUILD_SHARED_LIBS": true, + "CONAN_AUTO_INSTALL": true, + "EXIV2_BUILD_SAMPLES": true, + "EXIV2_ENABLE_WEBREADY": true, + "EXIV2_ENABLE_CURL": true, + "EXIV2_ENABLE_PNG": true, + "EXIV2_ENABLE_BMFF": true, + "EXIV2_BUILD_UNIT_TESTS": true, + "EXIV2_TEAM_WARNINGS_AS_ERRORS": true, + "EXIV2_ENABLE_NLS": false + } + }, + { + "name": "base_windows", + "description": "Base preset for Windows (specially useful for CI jobs)", + "displayName": "Base preset for Windows (specially useful for CI jobs)", + "inherits": "base_ninja", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + }, + { + "name": "base_linux", + "description": "Base preset for Linux", + "displayName": "Base preset for Linux with default compiler: GCC (specially useful for CI jobs)", + "inherits": "base_ninja", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + }, + "cacheVariables": { + "BUILD_WITH_CCACHE": true + } + }, + { + "name": "base_mac", + "description": "Base preset for macOS (no conan usage)", + "displayName": "Base preset for macOS with default compiler: AppleClang (specially useful for CI jobs)", + "inherits": "base_ninja", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "CONAN_AUTO_INSTALL": false + } + }, + + { + "name": "msvc", + "displayName": "Visual Studio cl toolchain (also usable from VS Code)", + "inherits": "base_windows", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "toolset": { + "value": "host=x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_C_COMPILER": "cl.exe", + "CMAKE_CXX_COMPILER": "cl.exe", + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "win-debug", + "displayName": "Windows Debug with configured architecture", + "description": "Sets Debug build type with the preloaded Visual Studio Environment", + "inherits": "base_windows", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "win-release", + "displayName": "Windows Release with configured architecture", + "description": "Sets Release build type with the preloaded Visual Studio Environment", + "inherits": "base_windows", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "linux-debug", + "displayName": "Linux Debug (Ninja Generator) with default architecture", + "inherits": "base_linux", + "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } + }, + { + "name": "linux-release", + "displayName": "Linux Release (Ninja Generator) with default architecture", + "inherits": "base_linux", + "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } + }, + { + "name": "linux-debug-NoConan", + "displayName": "Same as linux-debug but without automatic conan execution", + "inherits": "linux-debug", + "cacheVariables": { "CONAN_AUTO_INSTALL": false } + }, + { + "name": "linux-release-NoConan", + "displayName": "Same as linux-release but without automatic conan execution", + "inherits": "linux-release", + "cacheVariables": { "CONAN_AUTO_INSTALL": false } + }, + { + "name": "linux-coverage", + "displayName": "Same as linux-debug-NoConan with coverage enabled", + "inherits": "linux-debug-NoConan", + "cacheVariables": { "BUILD_WITH_COVERAGE": true } + }, + { + "name": "linux-sanitizers", + "displayName": "Same as linux-debug-NoConan with sanitizers enabled", + "inherits": "linux-debug-NoConan", + "cacheVariables": { "EXIV2_TEAM_USE_SANITIZERS": true } + }, + { + "name": "linux-all", + "displayName": "Same as linux-release-NoConan and with rest of things enabled (doc + NLS)", + "description": "requires installation of packages: doxygen graphviz gettext", + "inherits": "linux-release-NoConan", + "cacheVariables": { + "EXIV2_ENABLE_NLS": true, + "EXIV2_BUILD_DOC": true + } + } + + ] +} diff --git a/README.md b/README.md index f6a906ea..6aeb2f18 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ The file ReadMe.txt in a build bundle describes how to install the library on th - [Building, Installing, Using and Uninstalling Exiv2](#B_I_U) - [Build, Install, Use and Uninstall Exiv2 on a UNIX-like system](#B_I_U_Unix) - [Build and Install Exiv2 with Visual Studio](#B_I_U_VisualStudio) + - [Configure the project with CMake presets](#CMakePresets) - [Build Options](#BuildOptions) - [Dependencies](#Dependencies) - [Building and linking your code with Exiv2](#BuildAndLinkYourCode) @@ -126,7 +127,7 @@ path. ## Build and Install Exiv2 with Visual Studio -We recommend that you use conan to download the Exiv2 external dependencies on Windows. On other platforms (macOS, Linux and others), traditionally the platform package managers have been used. These are discussed at [Platform Notes](#PlatformNotes). The options to configure and compile the project using Visual Studio are similar to UNIX like systems. +We recommend to use conan to download the Exiv2 external dependencies on Windows. On other platforms (macOS, Linux and others), traditionally the platform package managers have been used. However, conan can be used in any platform/architecture to bring the project dependencies. These are discussed at [Platform Notes](#PlatformNotes). The options to configure and compile the project using Visual Studio are similar to UNIX like systems. See [README-CONAN](README-CONAN.md) for more information about Conan. When you build, you may install with the following command. @@ -136,6 +137,99 @@ When you build, you may install with the following command. ``` This will create and copy the exiv2 build artefacts to `%ProgramFiles%/exiv2`. To be able to run the `exiv2` command line application from any terminal you should modify your path to include `%ProgramFiles%/exiv2/bin`. +[TOC](#TOC) +