There was a temporary agency called the War Production Board formed by FDR's executive order that more or less had full control of civilian industry - directing factories what to make, allocating raw materials etc. I don't believe the industry owners were given choice in the matter, if you had a typewriter factory and they told you to make machine guns, you made machine guns.