Buildings made from cubes
JavaScript (Node.js), \$N=10\$ in 4m02s1
1: on an Intel Code i7, 7th Gen
This only includes some trivial optimizations and is therefore quite inefficient. It does at least confirm the results listed in the challenge.
function build(n) {
  let layer = [],
      cube = new Set,
      count = 0,
      x, y;

  for(y = 0; y &lt; n; y++) {
    for(layer[y] = [], x = 0; x &lt; n; x++) {
      layer[y][x] = 0;
    }
  }

  function fill(k, alignTop) {
    let x, y;

    if(k == 0) {
      if(!cube.has(layer + '')) {
        let transf;

        count++;

        cube.add(layer + '');
        cube.add((transf = rotate(n, layer)) + '');
        cube.add((transf = rotate(n, transf)) + '');
        cube.add((transf = rotate(n, transf)) + '');

        cube.add((transf = mirror(layer)) + '');
        cube.add((transf = rotate(n, transf)) + '');
        cube.add((transf = rotate(n, transf)) + '');
        cube.add((transf = rotate(n, transf)) + '');
      }
      return;
    }

    let y0;

    for(y0 = 0; !layer[y0].some(v =&gt; v); y0++) {}

    for(y = Math.max(0, y0 - 1); y &lt; n; y++) {
      for(x = 0; x &lt; n; x++) {
        if(
          !layer[y][x] &amp;&amp; (
            (y &amp;&amp; layer[y - 1][x]) ||
            (y &lt; n - 1 &amp;&amp; layer[y + 1][x]) ||
            (x &amp;&amp; layer[y][x - 1]) ||
            (x &lt; n - 1 &amp;&amp; layer[y][x + 1])
          )
        ) {
          for(let i = 1; i &lt;= (alignTop ? k : k - y0 - 1); i++) {
            layer[y][x] = i;
            fill(k - i, alignTop || !y);
            layer[y][x] = 0;
          }
        }
      }
    }
  }

  for(y = 0; y &lt; n; y++) {
    for(let i = 1; i &lt;= n - y; i++) {
      layer[y][0] = i;
      fill(n - i, !y);
      layer[y][0] = 0;
    }
  }

  return count;
}

function rotate(n, layer) {
  let rot = [],
      x, y;

  for(y = 0; y &lt; n; y++) {
    for(rot[y] = [], x = 0; x &lt; n; x++) {
      rot[y][x] = layer[n - x - 1][y];
    }
  }
  return align(rot);
}

function mirror(layer) {
  return align([...layer].reverse());
}

function align(layer) {
  while(!layer[0].some(v =&gt; v)) {
    let s = layer.shift();
    layer = [...layer, s];
  }
  while(!layer[0].some((_, y) =&gt; layer[y][0])) {
    layer = layer.map(r =&gt; {
      return [...r.slice(1), 0];
    });
  }
  return layer;
}

Try it online! (up to \$N=8\$)
Output
N = 1 --&gt; 1
time: 10.352ms
N = 2 --&gt; 2
time: 0.935ms
N = 3 --&gt; 4
time: 0.877ms
N = 4 --&gt; 12
time: 2.530ms
N = 5 --&gt; 35
time: 9.060ms
N = 6 --&gt; 129
time: 33.333ms
N = 7 --&gt; 495
time: 157.160ms
N = 8 --&gt; 2101
time: 1559.707ms
N = 9 --&gt; 9154
time: 18555.900ms
N = 10 --&gt; 41356
time: 242855.989ms