Compare commits
2 Commits
prerelease
...
prerelease
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5381967ed6 | ||
|
|
6f84a4a485 |
12
conanfile.py
12
conanfile.py
@@ -5,6 +5,7 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
|
||||
from shutil import which
|
||||
import os
|
||||
|
||||
class ArgonConan(ConanFile):
|
||||
name = "argon"
|
||||
@@ -31,9 +32,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()
|
||||
|
||||
Reference in New Issue
Block a user