Changed the UNIX-only commands to CMake generic commands.