Fix a bug - different libraries should have different building pathes.