@@ -38,6 +38,22 @@ func getCompilerParameters(rootPath string, dep *models.Dependency, platform str
3838 "/P:platform=" + platform + " "
3939}
4040
41+ func buildSearchPath (dep * models.Dependency ) string {
42+ var searchPath = ""
43+
44+ if dep != nil {
45+ searchPath = filepath .Join (env .GetModulesDir (), dep .GetName ())
46+
47+ if pac , e := models .LoadPackageOther (filepath .Join (env .GetModulesDir (), dep .GetName (), consts .FilePackage )); e == nil {
48+ searchPath += ";" + filepath .Join (env .GetModulesDir (), dep .GetName (), pac .MainSrc )
49+ for _ , lib := range pac .GetParsedDependencies () {
50+ searchPath += buildSearchPath (& lib )
51+ }
52+ }
53+ }
54+ return searchPath
55+ }
56+
4157func compile (dprojPath string , dep * models.Dependency , rootLock models.PackageLock ) bool {
4258 msg .Info (" Building " + filepath .Base (dprojPath ))
4359
@@ -63,6 +79,8 @@ func compile(dprojPath string, dep *models.Dependency, rootLock models.PackageLo
6379 readFileStr += "\n @SET DCC_UnitSearchPath=%DCC_UnitSearchPath%;" + filepath .Join (env .GetModulesDir (), consts .DcuFolder ) +
6480 ";" + filepath .Join (env .GetModulesDir (), consts .DcpFolder ) //+ ";" + getNewPathsDep(dep, abs) + " "
6581
82+ readFileStr += ";" + buildSearchPath (dep )
83+
6684 readFileStr += "\n @SET PATH=%PATH%;" + filepath .Join (env .GetModulesDir (), consts .BplFolder ) + ";"
6785 for _ , value := range []string {"Win32" } {
6886 readFileStr += " \n msbuild \" " + project + "\" /p:Configuration=Debug " + getCompilerParameters (env .GetModulesDir (), dep , value )
0 commit comments