I have a cc_import rule that looks like this, on both platforms:
cc_import(
name = "usd_ar",
hdrs = glob(["include/pxr/usd/ar/*.h"]),
includes = ["external/OpenUSD_Ubuntu/include"],
shared_library = "lib/libusd_ar.so",
deps = [
":usd_arch",
":usd_gf",
":usd_js",
":usd_plug",
":usd_tf",
":usd_trace",
":usd_vt",
":usd_work",
],
)
except that they are dylibs instead of so's on MacOS.
I see that the library my code actually links against is
<long temp path>/external/OpenUSD_MacOS/lib/libusd_plug.dylib
on MacOS and
<long temp path>/bazel-out/k8-fastbuild/bin/_solib_k8/_U@@OpenUSD_UUbuntu_S_S_Cusd_Uplug___Ulib/libusd_plug.so
on Linux.
In other words, the file is copied into a special location on Linux but is left alone on the Mac. For complicated reasons, I would very much prefer the MacOS behavior. Is there any way to do this?
Thanks in advance.