Skip to content

Commit b2df774

Browse files
committed
Allow searching LIBRARY_PATH with build_library=no
Instead of assuming the library is already present in bin/ when asking not to build it, allow the linker to search the system for it as well.
1 parent c943beb commit b2df774

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/godotcpp.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,12 @@ def _godot_cpp(env):
574574
default_args += ["compiledb"]
575575

576576
env.Default(*default_args)
577+
else:
578+
# When not building the library, allow it to be found in other library
579+
# paths on the system. It may have been built previously, so still add
580+
# bin/ to the search path.
581+
env.AppendUnique(LIBPATH=[env.Dir("bin/")])
582+
env.AppendUnique(LIBS=[library_name])
577583

578584
env.AppendUnique(LIBS=[env.File("bin/%s" % library_name)])
579585
return library

0 commit comments

Comments
 (0)