Codesign Macos dylib when using Ninja

Are there any specific flags for CMake to codesign libraries on Macos when using Ninja.
(similar to CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY) ?

No, if you’re using Ninja, you’re responsible for implementing all the code signing steps manually yourself. Only Xcode has built-in support for that.