set(BUILD_STATIC ON)

set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSROOT /usr/${TARGET})

set(CMAKE_C_COMPILER ${TARGET}-gcc)
set(CMAKE_CXX_COMPILER ${TARGET}-g++)

set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_SYSROOT}/lib/pkgconfig:${CMAKE_SYSROOT}/share/pkgconfig)
set(ENV{PKG_CONFIG_PATH} $ENV{PKG_CONFIG_LIBDIR})

set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
