def METHOD_NAME(self):
    spec = self.spec
    libs_to_seek = set()
    if "platform=windows" in spec:
        libs_to_seek.add("opengl32")
        if "+osmesa" in spec:
            libs_to_seek.add("osmesa")
    else:
        libs_to_seek.add("libGL")
        if "+osmesa" in spec:
            libs_to_seek.add("libOSMesa")
        if "+glx" in spec:
            libs_to_seek.add("libGL")
    if "+opengles" in spec:
        libs_to_seek.add("libGLESv1_CM")
        libs_to_seek.add("libGLESv2")
    return find_libraries(
        list(libs_to_seek), root=self.spec.prefix, shared=True, recursive=True
    )