Use RPM macro for cmake, thread installs

Using the %cmake macro adds some defines to cmake that allow for proper
debuginfo extraction