Better handling of setting Windows flag in Conan.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-01-01 13:24:02 +01:00
parent ecb17a8bad
commit 1facac87cb
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 4 additions and 3 deletions

View File

@ -7,15 +7,16 @@ class CreatureLibConan(ConanFile):
url = "https://git.p-epsilon.com/Deukhoofd/CreatureLib" url = "https://git.p-epsilon.com/Deukhoofd/CreatureLib"
description = "The core implementation for turn based battling using creatures." description = "The core implementation for turn based battling using creatures."
settings = "compiler" settings = "compiler"
options = {"shared": [True, False], "windows": [True, False]} options = {"shared": [True, False]}
default_options = {"shared": True, "windows": False} default_options = {"shared": True}
generators = "cmake" generators = "cmake"
exports_sources = "*" exports_sources = "*"
compiler = "clang" compiler = "clang"
def build(self): def build(self):
cmake = CMake(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.configure()
cmake.build() cmake.build()