def METHOD_NAME(self):
    tc = CMakeToolchain(self)
    # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840)
    tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW"
    tc.METHOD_NAME()