From f371f9e0ce5dd71930191417ddb71e088fa5634f Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Thu, 26 Dec 2024 14:40:13 +0100 Subject: [PATCH] Update conan recipe (#389) --- conanfile.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/conanfile.py b/conanfile.py index 54ad2160..9cb1dca4 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,11 +1,7 @@ -import os - from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake from conan.tools.env import Environment -from conan.tools.env.environment import EnvVars -from conan.tools.files import copy class OpenDocumentCoreConan(ConanFile): @@ -27,8 +23,18 @@ class OpenDocumentCoreConan(ConanFile): default_options = { "shared": False, "fPIC": True, + "with_pdf2htmlEX": True, + "with_wvWare": True, } + exports_sources = ["cli/*", "cmake/*", "src/*", "CMakeLists.txt"] + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + del self.options.with_pdf2htmlEX + del self.options.with_wvWare + def requirements(self): self.requires("pugixml/1.14") self.requires("cryptopp/8.9.0") @@ -37,9 +43,9 @@ def requirements(self): self.requires("vincentlaucsb-csv-parser/2.3.0") self.requires("uchardet/0.0.8") self.requires("utfcpp/4.0.4") - if self.options.get_safe("with_pdf2htmlEX"): - self.requires("pdf2htmlex/0.18.8.rc1-20240905-git") - if self.options.get_safe("with_wvWare"): + if self.options.get_safe("with_pdf2htmlEX", False): + self.requires("pdf2htmlex/0.18.8.rc1-git-6f85c88") + if self.options.get_safe("with_wvWare", False): self.requires("wvware/1.2.9") def build_requirements(self): @@ -49,15 +55,6 @@ def validate_build(self): if self.settings.get_safe("compiler.cppstd"): check_min_cppstd(self, 20) - exports_sources = ["cli/*", "cmake/*", "src/*", "CMakeLists.txt"] - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - self.options.with_pdf2htmlEX = self.settings.os not in ["Windows", "Macos"] - self.options.with_wvWare = self.settings.os not in ["Windows", "Macos"] - def configure(self): if self.options.shared: self.options.rm_safe("fPIC")