Commit 2f61fc84 authored by Tom Finegan's avatar Tom Finegan

Add mingw-w64 CMake toolchain files.

BUG=aomedia:707

Change-Id: I9b819e630a1c56b5df359c6e65acb6f80ae513e3
parent f572cd30
......@@ -392,6 +392,8 @@ endif ()
if (CONFIG_WEBM_IO)
add_library(webm OBJECT ${AOM_LIBWEBM_SOURCES})
include_directories("${AOM_ROOT}/third_party/libwebm")
target_compile_definitions(webm PRIVATE __STDC_CONSTANT_MACROS)
target_compile_definitions(webm PRIVATE __STDC_LIMIT_MACROS)
if (NOT MSVC)
target_compile_options(webm PRIVATE -Wno-shadow)
......
##
## Copyright (c) 2017, Alliance for Open Media. All rights reserved
##
## This source code is subject to the terms of the BSD 2 Clause License and
## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
## was not distributed with this source code in the LICENSE file, you can
## obtain it at www.aomedia.org/license/software. If the Alliance for Open
## Media Patent License 1.0 was not distributed with this source code in the
## PATENTS file, you can obtain it at www.aomedia.org/license/patent.
##
if (NOT AOM_BUILD_CMAKE_TOOLCHAINS_X86_MINGW_GCC_CMAKE_)
set(AOM_BUILD_CMAKE_TOOLCHAINS_X86_MINGW_GCC_CMAKE_ 1)
set(CMAKE_SYSTEM_PROCESSOR "x86")
set(CMAKE_SYSTEM_NAME "Windows")
set(CMAKE_C_COMPILER_ARG1 "-m32")
set(CMAKE_CXX_COMPILER_ARG1 "-m32")
if ("${CROSS}" STREQUAL "")
set(CROSS i686-w64-mingw32-)
endif ()
set(CMAKE_C_COMPILER ${CROSS}gcc)
set(CMAKE_CXX_COMPILER ${CROSS}g++)
# Disable the use of the gtest's CMake support.
set(AOM_DISABLE_GTEST_CMAKE 1)
endif () # AOM_BUILD_CMAKE_TOOLCHAINS_X86_MINGW_GCC_CMAKE_
##
## Copyright (c) 2017, Alliance for Open Media. All rights reserved
##
## This source code is subject to the terms of the BSD 2 Clause License and
## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
## was not distributed with this source code in the LICENSE file, you can
## obtain it at www.aomedia.org/license/software. If the Alliance for Open
## Media Patent License 1.0 was not distributed with this source code in the
## PATENTS file, you can obtain it at www.aomedia.org/license/patent.
##
if (NOT AOM_BUILD_CMAKE_TOOLCHAINS_X86_64_MINGW_GCC_CMAKE_)
set(AOM_BUILD_CMAKE_TOOLCHAINS_X86_64_MINGW_GCC_CMAKE_ 1)
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(CMAKE_SYSTEM_NAME "Windows")
if ("${CROSS}" STREQUAL "")
set(CROSS x86_64-w64-mingw32-)
endif ()
set(CMAKE_C_COMPILER ${CROSS}gcc)
set(CMAKE_CXX_COMPILER ${CROSS}g++)
# Disable the use of the gtest's CMake support.
set(AOM_DISABLE_GTEST_CMAKE 1)
endif () # AOM_BUILD_CMAKE_TOOLCHAINS_X86_64_MINGW_GCC_CMAKE_
......@@ -353,16 +353,24 @@ if (CONFIG_UNIT_TESTS)
# Force static run time to avoid collisions with googletest.
include("${AOM_ROOT}/build/cmake/msvc_runtime.cmake")
endif ()
include_directories(
"${AOM_ROOT}/third_party/googletest/src/googletest/src"
"${AOM_ROOT}/third_party/googletest/src/googletest/include")
if (BUILD_SHARED_LIBS AND APPLE)
# Silence an RPATH warning.
set(CMAKE_MACOSX_RPATH 1)
endif ()
add_subdirectory("${AOM_ROOT}/third_party/googletest/src/googletest"
EXCLUDE_FROM_ALL)
include_directories(
"${AOM_ROOT}/third_party/googletest/src/googletest/src"
"${AOM_ROOT}/third_party/googletest/src/googletest/include")
if (AOM_DISABLE_GTEST_CMAKE)
include_directories("${AOM_ROOT}/third_party/googletest/src/googletest")
add_library(gtest STATIC
"${AOM_ROOT}/third_party/googletest/src/googletest/src/gtest-all.cc")
else ()
add_subdirectory("${AOM_ROOT}/third_party/googletest/src/googletest"
EXCLUDE_FROM_ALL)
endif ()
# Generate a stub file containing the C function usage_exit(); this is
# required because of the test dependency on aom_common_app_util.
......
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