[CMake] Properly fix handling of plugin JSes in install
Follow-up from #431.
Instead of running the GLOB right when the webgui CMake is called, the whole thing should only be called right before the install target is executed. It should be ensured that the core parts of CodeCompass are all loaded and configured before plugins' directories are handled.
Side note: I found that Neovim's build system (albeit convoluted because it's make calling cmake calling make...) handles re-running the generation when GLOB patterns are rebuilt, using standard CMake features:
New in version 3.12: If the
CONFIGURE_DEPENDSflag is specified, CMake will add logic to the main build system check target to rerun the flaggedGLOBcommands at build time. If any of the outputs change, CMake will regenerate the build system.
--- GLOB mismatch!