cmake: No default ffmpeg on 32 bit Windows.
Only check for ffmpeg if it's not explicitly turned off and the target is not 32 bit Windows. This is done because Windows XP does not have bcrypt.dll which ffmpeg requires and the 32 bit builds are more likely to be used on older systems which would also benefit from the smaller binary size. Also add the X86 and X64 cmake architecture variable flags. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
4e00fa605b
commit
939a88ab4a
|
@ -153,13 +153,15 @@ macro(check_ffmpeg_component_versions)
|
|||
endif()
|
||||
endmacro()
|
||||
|
||||
set(FFMPEG_DEFAULT ON)
|
||||
if(((NOT DEFINED ENABLE_FFMPEG) AND (NOT (WIN32 AND X86))) OR ENABLE_FFMPEG)
|
||||
set(FFMPEG_DEFAULT ON)
|
||||
|
||||
find_package(FFmpeg COMPONENTS ${FFMPEG_COMPONENTS})
|
||||
check_ffmpeg_component_versions()
|
||||
find_package(FFmpeg COMPONENTS ${FFMPEG_COMPONENTS})
|
||||
check_ffmpeg_component_versions()
|
||||
|
||||
if(NOT FFMPEG_FOUND)
|
||||
set(FFMPEG_DEFAULT OFF)
|
||||
if(NOT FFMPEG_FOUND)
|
||||
set(FFMPEG_DEFAULT OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(ENABLE_FFMPEG "Enable ffmpeg A/V recording" ${FFMPEG_DEFAULT})
|
||||
|
|
|
@ -16,9 +16,11 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]86|i[3-9]86|[aA][mM][dD]64")
|
|||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 4) # 32 bit
|
||||
set(ASM_DEFAULT ON)
|
||||
set(X86_32 ON)
|
||||
set(X86 ON)
|
||||
set(WINARCH x86)
|
||||
else()
|
||||
set(AMD64 ON)
|
||||
set(X64 ON)
|
||||
set(WINARCH x64)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue