The easiest way to "tie" different versions of a building to a certain tech is to give all those civs there own era-none tech. Now there are several ways to set civspecific buildings in a mod or scenario:
a) Allow a civspecific building that can be directly been built by that era-none tech and set this civspecific building as a prerequisite of other civspecific buildings. Give the cicspecific buildings culture to assure, that they are no longer existing, when the city is captured by a different civ.
This is the way civspecific buildings were set in CCM up to CCM 2.50. The civspecific buildings that were directly buildable by the different era-none techs of the civs were era-specific flags/symbols of that civ.
b) Since CCM 3 a different methode for civspecific buildings had to be used, as there were only 256 building slots available at that time. The different civspecific versions of a building are tied directly to the civspecific era-none tech of that civ and this civ-specific building needs another prerequisite (another building or a resource), that becomes available by the tech, when that building should be really available in the game.
To assure, that the building in the techtree appears in the box of the tech when it really should be available in the game (the tech that makes the resource/building prerequisite available), the creation of a "dummy-information", in CCM 3 based on a "dummy-unit" with the name of that building, is needed.