Skip to content

Commit

Permalink
Add environment variable support for lib path
Browse files Browse the repository at this point in the history
  • Loading branch information
vipentti committed Dec 4, 2023
1 parent ef249ba commit 9a10225
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ from framework in TargetFrameworks
.SetProcessEnvironmentVariable("VISP_FS_COMMON_PACKAGE_PATH", PackagePath)
.SetProcessEnvironmentVariable("VISP_FS_PACKAGE_PATH", PackagePath)
.SetProcessEnvironmentVariable("VISP_FS_PACKAGE_FEED_PATH", PackagePath / "feed")
.SetProcessEnvironmentVariable("VISP_FS_LIB_PATH", RootDirectory / "visp" / "lib")
;

Target ITest.Test => _ => _
Expand Down
8 changes: 5 additions & 3 deletions src/Visp.Compiler/FsharpGenerator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ let tempDirPath name =
Path.Combine(src_dir, "..", "..", ".tmp", name) |> Path.GetFullPath

let coreLibPath name =
let src_dir = __SOURCE_DIRECTORY__

Path.Combine(src_dir, "..", "..", "visp", "lib", name) |> Path.GetFullPath
match Environment.GetEnvironmentVariable("VISP_FS_LIB_PATH") with
| null ->
let src_dir = __SOURCE_DIRECTORY__
Path.Combine(src_dir, "..", "..", "visp", "lib", name) |> Path.GetFullPath
| path -> Path.Combine(path, name) |> Path.GetFullPath

let runtimeLibPath =
let src_dir = __SOURCE_DIRECTORY__
Expand Down

0 comments on commit 9a10225

Please sign in to comment.