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):
564
564
library = None
565
565
library_name = "libgodot-cpp" + env ["suffix" ] + env ["LIBSUFFIX" ]
566
566
567
+ default_args = []
568
+
567
569
if env ["build_library" ]:
568
570
library = env .StaticLibrary (target = env .File ("bin/%s" % library_name ), source = sources )
569
571
env .NoCache (library )
570
572
default_args = [library ]
571
573
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" ]
575
585
576
- env .Default (* default_args )
586
+ env .Default (* default_args )
577
587
578
- env .AppendUnique (LIBS = [env .File ("bin/%s" % library_name )])
579
588
return library
You can’t perform that action at this time.
0 commit comments