mirror of https://github.com/PCSX2/pcsx2.git
Disable the use of multiple architectures in darwin.
- Update copyright due to incoming changes. - Don't support universal binaries until they actually work therefore only allow 1 architecture in CMAKE_OSX_ARCHITECTURES. - Don't allow an empty ARCH list. We probably asked for ppc or ppc64 w/o support for it.
This commit is contained in:
parent
b18b0fdf28
commit
e548ada1e9
|
@ -1,3 +1,4 @@
|
||||||
|
# Copyright (c) 2014 PCSX2 Dev Team
|
||||||
# Copyright (c) 2012 Petroules Corporation. All rights reserved.
|
# Copyright (c) 2012 Petroules Corporation. All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -88,6 +89,11 @@ function(target_architecture output_var)
|
||||||
# Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime.
|
# Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime.
|
||||||
# On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise.
|
# On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise.
|
||||||
|
|
||||||
|
LIST(LENGTH CMAKE_OSX_ARCHITECTURES osx_arch_num)
|
||||||
|
if(NOT (osx_arch_num EQUAL 1))
|
||||||
|
message(FATAL_ERROR "Currently ${CMAKE_PROJECT_NAME} does not support multiple architectures in CMAKE_OSX_ARCHITECTURES")
|
||||||
|
endif()
|
||||||
|
|
||||||
foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES})
|
foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES})
|
||||||
if("${osx_arch}" STREQUAL "ppc" AND ppc_support)
|
if("${osx_arch}" STREQUAL "ppc" AND ppc_support)
|
||||||
set(osx_arch_ppc TRUE)
|
set(osx_arch_ppc TRUE)
|
||||||
|
@ -118,6 +124,11 @@ function(target_architecture output_var)
|
||||||
if(osx_arch_ppc64)
|
if(osx_arch_ppc64)
|
||||||
list(APPEND ARCH ppc64)
|
list(APPEND ARCH ppc64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
LIST(LENGTH ARCH osx_arch_num)
|
||||||
|
if(osx_arch_num LESS 1)
|
||||||
|
message(FATAL_ERROR "Invalid CMAKE_OSX_ARCHITECTURES: ${CMAKE_OSX_ARCHITECTURES}")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}")
|
file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue