(lib_name)
| 29 | |
| 30 | |
| 31 | def _maybe_add_library_root(lib_name): |
| 32 | if "%s_ROOT" % lib_name in os.environ: |
| 33 | root = os.environ["%s_ROOT" % lib_name] |
| 34 | include_dirs.append("%s/include" % root) |
| 35 | for lib_dir in ("lib", "lib64"): |
| 36 | path = "%s/%s" % (root, lib_dir) |
| 37 | if os.path.exists(path): |
| 38 | library_dirs.append(path) |
| 39 | break |
| 40 | |
| 41 | |
| 42 | _maybe_add_library_root("CTRANSLATE2") |