Add conan build options

This commit is contained in:
2025-07-22 22:32:01 +02:00
parent 13434ce31a
commit 27f3f61b77

View File

@@ -12,9 +12,13 @@ class PlatformConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
options = {
"enable_testing": [True, False],
"shared": [True, False],
"fPIC": [True, False],
}
default_options = {
"enable_testing": False,
"shared": False,
"fPIC": True,
}
# Sources are located in the same place as this recipe, copy them to the recipe
@@ -47,6 +51,14 @@ class PlatformConan(ConanFile):
self.test_requires("catch2/3.8.1")
self.test_requires("arff-files/1.2.1")
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
def layout(self):
cmake_layout(self)