mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
cmake: Fix CMP0077 policy warnings.
Fixes https://github.com/hrydgard/ppsspp/issues/11629
This commit is contained in:
parent
828dcc26b7
commit
9aed8908a2
@ -13,7 +13,6 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||
|
||||
add_definitions(-D__STDC_CONSTANT_MACROS)
|
||||
|
||||
|
||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
set(CLANG ON)
|
||||
message("Clang enabled")
|
||||
@ -27,17 +26,17 @@ endif()
|
||||
# Detect CPU from CMAKE configuration. Toolchains should set this up
|
||||
if(CMAKE_SYSTEM_PROCESSOR)
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
|
||||
set(ARM ON)
|
||||
if(UNIX AND NOT APPLE)
|
||||
execute_process(COMMAND cat /proc/cpuinfo OUTPUT_VARIABLE OUTSTR)
|
||||
string(FIND "${OUTSTR}" "ODROID-XU" pos)
|
||||
if(NOT (pos LESS 0))
|
||||
add_compile_options(-mfloat-abi=hard -marm -mtune=cortex-a15.cortex-a7 -mcpu=cortex-a15 -fomit-frame-pointer)
|
||||
set(ARM_NO_VULKAN ON)
|
||||
endif()
|
||||
set(ARM_DEVICE ON)
|
||||
if(UNIX AND NOT APPLE)
|
||||
execute_process(COMMAND cat /proc/cpuinfo OUTPUT_VARIABLE OUTSTR)
|
||||
string(FIND "${OUTSTR}" "ODROID-XU" pos)
|
||||
if(NOT (pos LESS 0))
|
||||
add_compile_options(-mfloat-abi=hard -marm -mtune=cortex-a15.cortex-a7 -mcpu=cortex-a15 -fomit-frame-pointer)
|
||||
set(ARM_NO_VULKAN ON)
|
||||
endif()
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^armv7")
|
||||
set(ARMV7 ON)
|
||||
set(ARMV7_DEVICE ON)
|
||||
add_compile_options(-mfpu=neon)
|
||||
# Horrifying workaround for bug in android cmake stuff for asm files
|
||||
if(ANDROID)
|
||||
@ -48,12 +47,12 @@ if(CMAKE_SYSTEM_PROCESSOR)
|
||||
set(ARM64 ON)
|
||||
add_definitions(-DARM64)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^AMD64")
|
||||
set(X86 ON)
|
||||
set(X86_64 ON)
|
||||
set(X86_DEVICE ON)
|
||||
set(X86_64_DEVICE ON)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86")
|
||||
set(X86 ON)
|
||||
set(X86_DEVICE ON)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^mips")
|
||||
set(MIPS ON)
|
||||
set(MIPS_DEVICE ON)
|
||||
else()
|
||||
message("Unknown CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
endif()
|
||||
@ -61,9 +60,6 @@ endif()
|
||||
|
||||
include(ccache)
|
||||
|
||||
# Remove soon?
|
||||
set(USE_FFMPEG ON)
|
||||
|
||||
# the libraries in the ffmpeg/ directory are not compatible with mingw
|
||||
if(MINGW AND NOT DEFINED USE_SYSTEM_FFMPEG)
|
||||
set(USE_SYSTEM_FFMPEG ON)
|
||||
@ -93,10 +89,6 @@ if(ANDROID OR WIN32 OR (UNIX AND NOT APPLE AND NOT ARM_NO_VULKAN))
|
||||
set(VULKAN ON)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED HEADLESS)
|
||||
set(HEADLESS OFF)
|
||||
endif()
|
||||
|
||||
if(GOLD)
|
||||
add_definitions(-DGOLD)
|
||||
message("Gold Build")
|
||||
@ -104,18 +96,13 @@ else()
|
||||
message("Normal Build")
|
||||
endif()
|
||||
|
||||
# Doesn't link on some platforms
|
||||
#if(NOT DEFINED UNITTEST)
|
||||
# set(UNITTEST OFF)
|
||||
#endif()
|
||||
|
||||
# User-editable options (go into CMakeCache.txt)
|
||||
# :: Processors
|
||||
option(ARMV7 "Set to ON if targeting an ARMv7 processor" ${ARMV7})
|
||||
option(ARM "Set to ON if targeting an ARM processor" ${ARM})
|
||||
option(MIPS "Set to ON if targeting a MIPS processor" ${MIPS})
|
||||
option(X86 "Set to ON if targeting an X86 processor" ${X86})
|
||||
option(X86_64 "Set to ON if targeting an X86_64 processor" ${X86_64})
|
||||
option(ARMV7 "Set to ON if targeting an ARMv7 processor" ${ARMV7_DEVICE})
|
||||
option(ARM "Set to ON if targeting an ARM processor" ${ARM_DEVICE})
|
||||
option(MIPS "Set to ON if targeting a MIPS processor" ${MIPS_DEVICE})
|
||||
option(X86 "Set to ON if targeting an X86 processor" ${X86_DEVICE})
|
||||
option(X86_64 "Set to ON if targeting an X86_64 processor" ${X86_64_DEVICE})
|
||||
# :: Environments
|
||||
option(USING_EGL "Set to ON if target environment uses EGL" ${USING_EGL})
|
||||
option(USING_FBDEV "Set to ON if target environment uses fbdev (eg. Pandora)" ${USING_FBDEV})
|
||||
@ -130,7 +117,7 @@ option(UNITTEST "Set to ON to generate the unittest target" ${UNITTEST})
|
||||
option(SIMULATOR "Set to ON when targeting an x86 simulator of an ARM platform" ${SIMULATOR})
|
||||
option(LIBRETRO "Set to ON to generate the libretro target" OFF)
|
||||
# :: Options
|
||||
option(USE_FFMPEG "Build with FFMPEG support" ${USE_FFMPEG})
|
||||
option(USE_FFMPEG "Build with FFMPEG support" ON)
|
||||
option(USE_DISCORD "Build with Discord support" ON)
|
||||
option(USE_SYSTEM_SNAPPY "Dynamically link against system snappy" ${USE_SYSTEM_SNAPPY})
|
||||
option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG})
|
||||
|
Loading…
Reference in New Issue
Block a user