How to create a procedural brick texture for a simple building without object size changing the texture size? I want to create some procedural textures that I can quickly reuse to texture objects.  For this example I want four sided cubes (ignore top and bottom) that are wrapped in bricks.


But, I want the bricks across different objects to be the same size, even if the objects are different sizes. You will notice in the image above that the "large building" is twice the size of the "small" building and the large building's bricks are also twice the size. I believe this is because the procedural texture in "UV mode" is based on the bounding size of the object, so the brick size does not change regardless of if the scale is normalized.  If I use the object node option, but that will not wrap the bricks around the cube. The only way I know to wrap the bricks is to use the Texture Coordinate node and UV as an input. 

Here is my material setup.



I think the key would be to use some math so the input value nodes to the brick height and width nodes are based on the object bounding box size, but I don't know how to get this as an input to modify my brick size.  

I also tried using a different object for the "object node" in the Texture Coordinate node, but the bricks did not wrap. 
Thanks.
When I read Rich Sedman's first answer, I realized that what he does with the two materials can be solved with a single material using a trick called triplanar mapping. 

What is the problem here? 3D procedural textures can be made size-independent using Object coordinates, but the brick texture is only a 2D procedural texture, so it does not wrap around the mesh.

What is triplanar mapping? A 2D texture is projected along the X, Y, and Z axes, and then we blend among these based on the angle of the currect face. It is used mostly for things like terrains, rocks, tree trunks but can be also used here (assuming that the faces are either in the XZ or in the YZ planes, so that we don't get blending artifacts). Cycles does not have built-in triplanar mapping support, but one can construct it from nodes, an example is here: http://www.blendswap.com/blends/view/78446

The following is a simplified version of the blendswap material, because in this case we only need two projections (X and Y - this is strictly speaking biplanar mapping), and I also took out the mapping nodes because the scaling can be tuned in the brick texture. Note however, that the mapping nodes could be useful to reduce the discontinuity at the edges, as in Rich's answer.

The nodes:



The result: