US spice firm McCormick & Co. has agreed a deal to buy Chinese bouillon maker Wuhan Asia-Pacific Condiments Co.