Baldvinsson is scheduled to link up with his new team-mates next week, pending international clearance.
The 22-year-old, a Faroese international, has made 120 appearances for Norwegian side Algard FK and scored 16 goals.
Rovers chairman Nick Higgs was quick to praise manager McGhee's large network of contacts that helped secure the player.
"We continue to cast our net further with Mark's extensive contacts," Higgs told the club's official website.
"We look forward to this exciting young player joining the club."