fix conan file

This commit is contained in:
William Bell
2025-08-15 19:37:38 +01:00
parent 4b4b1fa777
commit 27178003b0

View File

@@ -31,9 +31,14 @@ class ArgonConan(ConanFile):
def generate(self): def generate(self):
tc = CMakeToolchain(self) tc = CMakeToolchain(self)
if os.name == "nt": # Windows
flex_path = which("win_flex") or which("win_flex.exe")
if not flex_path:
raise Exception("win_flex not found in PATH. Install winflexbison via choco.")
else:
flex_path = which("flex") flex_path = which("flex")
if not flex_path: if not flex_path:
raise Exception("Flex not found in system PATH. Please install flex on your system.") raise Exception("Flex not found in system PATH. Please install flex on Linux/macOS.")
tc.variables["FLEX_EXECUTABLE"] = flex_path tc.variables["FLEX_EXECUTABLE"] = flex_path
tc.generate() tc.generate()