[x265] (REVISION) MinGW: 64-bits vs. XP compatibility

Steve Borho steve at borho.org
Mon Mar 31 23:30:26 CEST 2014


On Mon, Mar 31, 2014 at 4:21 PM, Steve Borho <steve at borho.org> wrote:
> On Mon, Mar 31, 2014 at 3:41 PM, JMK <three4teen16 at coldmail.nu> wrote:
>> Perhaps this way is much better...
>>
>> IN «source/CMakeLists.txt»:
>>
>> # ************************************************************************
>> if(WIN32)
>>    if(NOT MINGW)
>>       # Visual leak detector
>>       find_package(VLD QUIET)
>>       if(VLD_FOUND)
>>          add_definitions(-DHAVE_VLD)
>>          include_directories(${VLD_INCLUDE_DIRS})
>>          set(PLATFORM_LIBS ${PLATFORM_LIBS} ${VLD_LIBRARIES})
>>          link_directories(${VLD_LIBRARY_DIRS})
>>       endif()
>>       option(WINXP_SUPPORT "Make binaries compatible with Windows XP" OFF)
>>       if(WINXP_SUPPORT)
>>          # force use of workarounds for CONDITION_VARIABLE and atomic
>>          # intrinsics introduced after XP
>>          add_definitions(-D_WIN32_WINNT=_WIN32_WINNT_WINXP)
>>       endif()
>>    endif()
>>    if(MINGW)
>>       if(X86 AND NOT X64)
>>          add_definitions(-D_WIN32_WINNT=_WIN32_WINNT_WINXP)
>>       elseif(X64)
>>          add_definitions(-D_WIN32_WINNT=_WIN32_WINNT_VISTA)
>>       endif()
>>    endif()
>> endif()
>> # ************************************************************************
>
> is the root problem that _WIN32_WINNT is not defined at all for some
> MinGW build options?
>
> If so, a better fix would be to improve the compiler guards in winxp.h and cpp

Please test the commit I just pushed and see if it resolves all the
build issues.

-- 
Steve Borho


More information about the x265-devel mailing list