Liquid nails make a heavy duty construction adhesive. The tube fits in a caulking gun and will adhere to practically any surface.
Just don’t use it on asphalt based roofing material ie: shingles, felt, rolled roofing etc. it will eat a hole through it.
A thinset mortar would probably work. However, it has a tendency to crack whereas the adhesive is very durable in that regard.