set(CMAKE_SYSTEM_NAME QNX)

set(arch gcc_ntoaarch64le)

set(CMAKE_C_COMPILER qcc -V${arch})
set(CMAKE_C_COMPILER_TARGET ${arch})
set(CMAKE_CXX_COMPILER QCC -V${arch})
set(CMAKE_CXX_COMPILER_TARGET ${arch})

set(CMAKE_FIND_ROOT_PATH $ENV{QNX_HOST} $ENV{QNX_TARGET}/${QNX_PROCESSOR} $ENV{QNX_TARGET} ${CMAKE_INSTALL_PREFIX})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
