imported target enforcing overly restrictive compile options

I don’t know the mechanics behind why pybind11 says hidden visibility is required. The error mentioned in the pybind11 docs you linked to sounds somewhat familiar, so I probably hit it myself a while back. I won’t comment on whether what they are recommending is valid or not, I don’t have the bandwidth to investigate that one.