From 6f84a4a4850c0ba2ef655f82a468d40c272de8a2 Mon Sep 17 00:00:00 2001 From: William Bell <62452284+Ugric@users.noreply.github.com> Date: Fri, 15 Aug 2025 19:37:38 +0100 Subject: [PATCH] fix conan file --- conanfile.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index 3f50a17..5dd423d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -31,9 +31,14 @@ class ArgonConan(ConanFile): def generate(self): tc = CMakeToolchain(self) - flex_path = which("flex") - if not flex_path: - raise Exception("Flex not found in system PATH. Please install flex on your system.") + 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") + if not flex_path: + raise Exception("Flex not found in system PATH. Please install flex on Linux/macOS.") tc.variables["FLEX_EXECUTABLE"] = flex_path tc.generate()