From 1facac87cbf75ff6f340d4cc7619d0ee40d21db5 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 1 Jan 2020 13:24:02 +0100 Subject: [PATCH] Better handling of setting Windows flag in Conan. --- conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index bc1bfad..8bf0df0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -7,15 +7,16 @@ class CreatureLibConan(ConanFile): url = "https://git.p-epsilon.com/Deukhoofd/CreatureLib" description = "The core implementation for turn based battling using creatures." settings = "compiler" - options = {"shared": [True, False], "windows": [True, False]} - default_options = {"shared": True, "windows": False} + options = {"shared": [True, False]} + default_options = {"shared": True} generators = "cmake" exports_sources = "*" compiler = "clang" def build(self): cmake = CMake(self) - cmake.definitions["WINDOWS"] = self.settings.get_safe("windows") + if self.settings.get_safe("os") == "Windows": + cmake.definitions["WINDOWS"] = True cmake.configure() cmake.build()