From 1c89690bb8446aac62cfeefb9b226976cb68860c Mon Sep 17 00:00:00 2001 From: Chris Deininger Date: Sun, 23 Jun 2024 14:45:47 +0200 Subject: [PATCH 1/3] Use conanfile.py instead of conanfile.txt for better configuration options --- .github/workflows/build-develop.yml | 4 ++-- .github/workflows/build-release.yml | 4 ++-- conanfile.py | 16 ++++++++++++++++ conanfile.txt | 11 ----------- 4 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 conanfile.py delete mode 100644 conanfile.txt diff --git a/.github/workflows/build-develop.yml b/.github/workflows/build-develop.yml index 86bc4ad..b201c62 100644 --- a/.github/workflows/build-develop.yml +++ b/.github/workflows/build-develop.yml @@ -64,7 +64,7 @@ jobs: cache-name: cache-conan-packages with: path: ~/.conan2/p - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.txt') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- @@ -78,7 +78,7 @@ jobs: if: always() with: path: ~/.conan2/p - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.txt') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }} - name: Configure CMake run: cmake -B build --preset conan-default -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} -A Win32 -DDEV_BUILD=ON -DDEV_RELEASE_NUMBER="${{ env.DEV_RELEASE }}" diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index b231728..833319c 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -57,7 +57,7 @@ jobs: cache-name: cache-conan-packages with: path: ~/.conan2/p - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.txt') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- @@ -71,7 +71,7 @@ jobs: if: always() with: path: ~/.conan2/p - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.txt') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }} - name: Configure CMake run: cmake -B build --preset conan-default -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} -A Win32 diff --git a/conanfile.py b/conanfile.py new file mode 100644 index 0000000..1ccdb4a --- /dev/null +++ b/conanfile.py @@ -0,0 +1,16 @@ +from conan.tools.cmake import cmake_layout +from conan import ConanFile + + +class CompressorRecipe(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps" + + def requirements(self): + self.requires("jsoncpp/1.9.5") + self.requires("libcurl/8.6.0") + self.requires("geographiclib/2.3") + self.requires("sqlite3/3.45.3") + + def layout(self): + cmake_layout(self) diff --git a/conanfile.txt b/conanfile.txt deleted file mode 100644 index 737599d..0000000 --- a/conanfile.txt +++ /dev/null @@ -1,11 +0,0 @@ -[requires] -jsoncpp/1.9.5 -libcurl/8.6.0 -geographiclib/2.3 -sqlite3/3.45.3 - -[generators] -CMakeDeps -CMakeToolchain -[layout] -cmake_layout \ No newline at end of file From 05a329c0433d8aee01826eca13c17b045cbe66d4 Mon Sep 17 00:00:00 2001 From: Chris Deininger Date: Sun, 23 Jun 2024 14:50:20 +0200 Subject: [PATCH 2/3] libcurl: Use different SSL implementation (schannel) for reduced binary size --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 1ccdb4a..7125562 100644 --- a/conanfile.py +++ b/conanfile.py @@ -8,7 +8,7 @@ class CompressorRecipe(ConanFile): def requirements(self): self.requires("jsoncpp/1.9.5") - self.requires("libcurl/8.6.0") + self.requires("libcurl/8.6.0", options={"with_ssl": "schannel"}) self.requires("geographiclib/2.3") self.requires("sqlite3/3.45.3") From 72b19d4297e4563b4ec7a4ba065505c779560fa4 Mon Sep 17 00:00:00 2001 From: Chris Deininger Date: Mon, 24 Jun 2024 15:06:47 +0200 Subject: [PATCH 3/3] Rename conan recipe --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 7125562..fc4d842 100644 --- a/conanfile.py +++ b/conanfile.py @@ -2,7 +2,7 @@ from conan import ConanFile -class CompressorRecipe(ConanFile): +class vACDMRecipe(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeToolchain", "CMakeDeps"