Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update conan recipe #389

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -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):
Expand All @@ -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")
Expand All @@ -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):
Expand All @@ -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")
Expand Down
Loading