File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -564,16 +564,25 @@ def _godot_cpp(env):
564564 library = None
565565 library_name = "libgodot-cpp" + env ["suffix" ] + env ["LIBSUFFIX" ]
566566
567+ default_args = []
568+
567569 if env ["build_library" ]:
568570 library = env .StaticLibrary (target = env .File ("bin/%s" % library_name ), source = sources )
569571 env .NoCache (library )
570572 default_args = [library ]
571573
572- # Add compiledb if the option is set
573- if env .get ("compiledb" , False ):
574- default_args += ["compiledb" ]
574+ env .AppendUnique (LIBS = [env .File ("bin/%s" % library_name )])
575+ else :
576+ # When not building the library, allow it to be found in other library
577+ # paths on the system. It may have been built previously, so still add
578+ # bin/ to the search path.
579+ env .AppendUnique (LIBPATH = [env .Dir ("bin/" )])
580+ env .AppendUnique (LIBS = [library_name ])
581+
582+ # Add compiledb if the option is set
583+ if env .get ("compiledb" , False ):
584+ default_args += ["compiledb" ]
575585
576- env .Default (* default_args )
586+ env .Default (* default_args )
577587
578- env .AppendUnique (LIBS = [env .File ("bin/%s" % library_name )])
579588 return library
You can’t perform that action at this time.
0 commit comments