How to compile Powerdevil to include brightness controls on KDE

I have a fresh install of F36 and want to enable in-built brightness controls for my desktop monitors. I have verified that Ddcutil works and can control all available features.
I found out online that recompiling powerdevil with a flag turned on will enable the required feature, but I have no idea how to do so.