diff --git a/mesonbuild/cmake/tracetargets.py b/mesonbuild/cmake/tracetargets.py index bb5faa395..20c7462d1 100644 --- a/mesonbuild/cmake/tracetargets.py +++ b/mesonbuild/cmake/tracetargets.py @@ -55,7 +55,11 @@ def resolve_cmake_trace_targets(target_name: str, # CMake brute-forces a combination of prefix/suffix combinations to find the # right library. Assume any bare argument passed which is not also a CMake # target must be a system library we should try to link against. - res.libraries += clib_compiler.find_library(curr, env, []) + flib = clib_compiler.find_library(curr, env, []) + if flib is not None: + res.libraries += flib + else: + not_found_warning(curr) else: not_found_warning(curr) continue