xref: /aosp_15_r20/external/libwebm/build/x86-mingw-gcc.cmake (revision 103e46e4cd4b6efcf6001f23fa8665fb110abf8d)
1*103e46e4SHarish Mahendrakar#  Copyright (c) 2017 The WebM project authors. All Rights Reserved.
2*103e46e4SHarish Mahendrakar#
3*103e46e4SHarish Mahendrakar#  Use of this source code is governed by a BSD-style license
4*103e46e4SHarish Mahendrakar#  that can be found in the LICENSE file in the root of the source
5*103e46e4SHarish Mahendrakar#  tree. An additional intellectual property rights grant can be found
6*103e46e4SHarish Mahendrakar#  in the file PATENTS.  All contributing project authors may
7*103e46e4SHarish Mahendrakar#  be found in the AUTHORS file in the root of the source tree.
8*103e46e4SHarish Mahendrakarif(NOT LIBWEBM_BUILD_X86_MINGW_GCC_CMAKE_)
9*103e46e4SHarish Mahendrakar  set(LIBWEBM_BUILD_X86_MINGW_GCC_CMAKE_ 1)
10*103e46e4SHarish Mahendrakar
11*103e46e4SHarish Mahendrakar  set(CMAKE_SYSTEM_PROCESSOR "x86")
12*103e46e4SHarish Mahendrakar  set(CMAKE_SYSTEM_NAME "Windows")
13*103e46e4SHarish Mahendrakar  set(CMAKE_C_COMPILER_ARG1 "-m32")
14*103e46e4SHarish Mahendrakar  set(CMAKE_CXX_COMPILER_ARG1 "-m32")
15*103e46e4SHarish Mahendrakar
16*103e46e4SHarish Mahendrakar  if("${CROSS}" STREQUAL "")
17*103e46e4SHarish Mahendrakar    set(CROSS i686-w64-mingw32-)
18*103e46e4SHarish Mahendrakar  endif()
19*103e46e4SHarish Mahendrakar
20*103e46e4SHarish Mahendrakar  set(CMAKE_C_COMPILER ${CROSS}gcc)
21*103e46e4SHarish Mahendrakar  set(CMAKE_CXX_COMPILER ${CROSS}g++)
22*103e46e4SHarish Mahendrakar
23*103e46e4SHarish Mahendrakar  # Disable googletest CMake usage for mingw cross compiles.
24*103e46e4SHarish Mahendrakar  set(LIBWEBM_DISABLE_GTEST_CMAKE 1)
25*103e46e4SHarish Mahendrakar
26*103e46e4SHarish Mahendrakarendif() # LIBWEBM_BUILD_X86_MINGW_GCC_CMAKE_
27