title: CMake : parent directory?
body: <p>How to find the parent directory in CMake ?</p>
  
  <p>Assume that <code>${MYPROJECT_DIR}=/dir1/dir2/dir3/myproject/</code> and I want <code>${PARENT_DIR}=/dir1/dir2/dir3/</code>.</p>
  
  <p>How to do that ?
  <code>SET(PARENT_DIR ${MYPROJECT_DIR}/../)</code> doesn't seem to be the right syntax.</p>