><!-- fragment --><p>The modified <code>CMakeLists.txt</code> file should look like this:</p>
<div class="fragment"><div class="line">find_package(Protobuf REQUIRED)</div>
<div class="line"> </div>
<div class="line">set(PROTOBUF_IMPORT_DIRS)</div>
<div class="line">foreach(ITR ${GAZEBO_INCLUDE_DIRS})</div>
<div class="line">  if(ITR MATCHES &quot;.*gazebo-[0-9.]+$&quot;)</div>
<div class="line">    set(PROTOBUF_IMPORT_DIRS &quot;${ITR}/gazebo/msgs/proto&quot;)</div>
<div class="line">  endif()</div>
<div cl