Move common CMake stuff to Plugin.cmake