They will reportedly give up their second-round pick in the 2013 draft and a mid-round pick the following year to acquire the 49ers QB.
Speaking to ESPN, 49ers left tackle Joe Staley said: "I am happy he is going to get a shot to play somewhere. He is too talented not to.
"Will miss him on our squad but will still be close wherever he goes. Happy for his new opportunity."
Smith started nine games in 2012, throwing 1,737 yards.