# If we're cross-compiling then we need to set the target host manually.
if(MINGW AND CMAKE_CROSSCOMPILING)
    if(CMAKE_C_COMPILER_TARGET)
        set(HOST ${CMAKE_C_COMPILER_TARGET})
    else()
        if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
            set(HOST x86_64-w64-mingw32)
            set(BUILD x86_64-redhat-linux-gnu)
    	else()
            set(HOST i686-w64-mingw32)
            set(BUILD i686-redhat-linux-gnu)
        endif()
    endif()
endif()
