title: How to cross-compile with CMake
body: <p>I currently have a Visual Studio Code project, I'm running my main.cpp with CMake and everything works fine. I can also run my program from a command terminal under Ubuntu. I also managed to cross-compile a simple program but the problem is that my main.cpp is in a big project.
  My question is, is there a simple way to cross-compile my main.cpp for an ARM architecture (I am on x64-64).
  I have heard about toolchains but the examples don't really correspond to my case so I write this question. And i dont know how to edit my CMakeLists.txt in order to do this.
  Here is my CMakeLists.txt:</p>
  <pre><code>cmake_minimum_required(VERSION 3.0.0)
  project(hash VERSION 0.1.0)
  
  
  
  FILE(GLOB srcSources src/*.cpp)
  
  
  find_package(Qt5Core REQUIRED)
  
  
  add_executable(hash
  ${srcSources}
  )
  
  target_link_libraries(hash Qt5::Core)
  
  
  
  target_include_directories(hash PUBLIC
  &quot;${PROJECT_SOURCE_DIR}/include&quot;
  
  )
  </code></pre>
  <p>Thank you for your help</p>