Commit f769c4e1 authored by Tom Finegan's avatar Tom Finegan
Browse files

Make 32 bit builds via cmake possible on macos.

Working with ninja, make, and xcode generators using the
following args at cmake generation time:
-DAOM_TARGET_CPU=x86 -DCMAKE_OSX_ARCHITECTURES=i386 -DCONFIG_PIC=1

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=76

Change-Id: I830db21f7458417cb8048818e5681a78698a6068
parent c4e9e473
......@@ -30,18 +30,19 @@ if (NOT AOM_TARGET_CPU)
" CMAKE_GENERATOR=${CMAKE_GENERATOR}\n")
endif ()
endif ()
set(AOM_TARGET_SYSTEM ${CMAKE_SYSTEM_NAME})
if (NOT EXISTS "${AOM_ROOT}/build/cmake/targets/${AOM_TARGET_CPU}.cmake")
message("No RTCD template for ${AOM_TARGET_CPU}, using generic.")
endif ()
set(AOM_TARGET_SYSTEM ${CMAKE_SYSTEM_NAME})
if (NOT EXISTS "${AOM_ROOT}/build/cmake/targets/${AOM_TARGET_CPU}.cmake")
message("No RTCD template for ${AOM_TARGET_CPU}, using generic.")
set(AOM_TARGET_CPU "generic")
endif ()
if ("${AOM_TARGET_CPU}" STREQUAL "x86" OR "${AOM_TARGET_CPU}" STREQUAL "x86_64")
find_program(YASM_EXECUTABLE yasm $ENV{YASM_PATH})
if (NOT YASM_EXECUTABLE)
message(WARNING "Unable to find yasm, using generic as target CPU.")
set(AOM_TARGET_CPU "generic")
endif ()
if (NOT AOM_TARGET_CPU STREQUAL "generic")
find_program(YASM_EXECUTABLE yasm $ENV{YASM_PATH})
if (NOT YASM_EXECUTABLE)
message(WARNING "Unable to find yasm, using generic as target CPU.")
set(AOM_TARGET_CPU "generic")
endif ()
endif ()
endif ()
include("${AOM_ROOT}/build/cmake/targets/${AOM_TARGET_CPU}.cmake")
......
......@@ -79,7 +79,9 @@ function (get_asm_obj_format out_format)
message(FATAL_ERROR "Unknown obj format: ${AOM_TARGET_SYSTEM}")
endif ()
elseif ("${AOM_TARGET_CPU}" STREQUAL "x86")
if ("${AOM_TARGET_SYSTEM}" STREQUAL "Windows")
if ("${AOM_TARGET_SYSTEM}" STREQUAL "Darwin")
set(objformat "macho32")
elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Windows")
set(objformat "win32")
else ()
message(FATAL_ERROR "Unknown obj format: ${AOM_TARGET_SYSTEM}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment