(lib_name, header_only=False)
| 25 | |
| 26 | |
| 27 | def _maybe_add_library_root(lib_name, header_only=False): |
| 28 | root = os.environ.get(f"{lib_name}_ROOT") |
| 29 | if root is None: |
| 30 | return None |
| 31 | include_dirs.append(os.path.join(root, "include")) |
| 32 | if not header_only: |
| 33 | for lib_subdir in ("lib64", "lib"): |
| 34 | lib_dir = os.path.join(root, lib_subdir) |
| 35 | if os.path.isdir(lib_dir): |
| 36 | library_dirs.append(lib_dir) |
| 37 | return lib_dir |
| 38 | return None |
| 39 | |
| 40 | |
| 41 | _maybe_add_library_root("TOKENIZER") |