set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR "${PH_ARCH}")
set(TRIPLET "${PH_TRIPLET}")

set(TOOL_PREFIX "/usr/bin/${TRIPLET}")
set(CMAKE_LIBRARY_ARCHITECTURE "${TRIPLET}")
set(CMAKE_C_COMPILER    "${TOOL_PREFIX}-gcc")
set(CMAKE_CXX_COMPILER  "${TOOL_PREFIX}-g++")
set(CMAKE_RANLIB        "${TOOL_PREFIX}-ranlib" CACHE FILEPATH "ranlib")
set(CMAKE_AR            "${TOOL_PREFIX}-ar" CACHE FILEPATH "ar")
set(CMAKE_READELF       "${TOOL_PREFIX}-readelf" CACHE FILEPATH "readelf")

list(APPEND CMAKE_PREFIX_PATH "/soft/target")
set(CMAKE_FIND_ROOT_PATH "/usr/${TRIPLET}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY FIRST)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE FIRST)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE FIRST)
set(PIP_BINDIR "/usr/local/bin")
set(PIP_DEPLOY_LIBDIR "/usr/lib/${TRIPLET}")
#include_directories("${CMAKE_PREFIX_PATH}/include" "${CMAKE_PREFIX_PATH}/include/${TRIPLET}")
cmake_policy(SET CMP0025 NEW)