Refactor CMake installation workflow