def create_cmake_command(cmake_path, project_dir, install_dir, defines=None):
    """ @brief Create CMake command 

    @param cmake_path [in] Path to cmake
    @param project_dir [in] Path to CMake project root
    @param install_dir [in] Where to install CMake project
    @param defines [in] CMake variables to define

    @return CMake commmand
    """
    command = cmake_path
    command += " -DCMAKE_INSTALL_PREFIX=%s" % (install_dir)
    if defines:
        for define in defines:
            command += " -D%s=%s" % (define, defines[define])
    command += " %s" % project_dir
    return command