title: CMake Cross Platform Compile: file cannot create directory: /data. Maybe need administrative privileges
body: <p>I am trying to compile, depending on the detected system, a <code>tar.gz</code> file, or a <code>.deb</code> file.</p>
  
  <p>Using the below code, I am able to successfully create a <code>.deb</code> file when the detected system is Linux, however when compiling for QNX which recquires a `.tar.gz' file, I receive the error:</p>
  
  <pre><code>file cannot create directory: /data.  Maybe need administrative
    privileges.
  </code></pre>
  
  <p>This command for the system should not and cannot be run as <code>sudo</code>, and even when attempting running the make command as <code>sudo make install</code> I receive errors relating to the compile environment (configured for QNX).</p>
  
  <p>My CMakeList.txt code:</p>
  
  <pre class="lang-cmake prettyprint-override"><code>set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
  if( "${CMAKE_CXX_PLATFORM_ID}" MATCHES QNX )
      message( STATUS "QNX found" )
      set(CPACK_GENERATOR "STGZ")
  else()
      message( STATUS "defaulting to Linux" )
      set(CPACK_GENERATOR "DEB") 
  endif()
  
  install(
          TARGETS         binary 
          DESTINATION     "/data/"
          )  
  
  include(CPack)
  </code></pre>