mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
cmake: Use preprocessor for conditional compilation in Common
CommonExtra is gone! Still need to fix CommonFake later though.
This commit is contained in:
parent
fef8847a58
commit
83aaf30207
@ -312,59 +312,59 @@ endmacro()
|
||||
# Commented-out files are files that don't compile
|
||||
# and were disabled in the original MSVC project anyway
|
||||
|
||||
set(CommonExtra)
|
||||
if(ARM)
|
||||
set(CommonExtra ${CommonExtra}
|
||||
Common/ArmCPUDetect.cpp)
|
||||
if(ARMV7)
|
||||
set(CommonExtra ${CommonExtra}
|
||||
Common/ColorConvNEON.cpp)
|
||||
endif()
|
||||
elseif(X86)
|
||||
set(CommonExtra ${CommonExtra}
|
||||
Common/ABI.cpp
|
||||
Common/ABI.h
|
||||
Common/CPUDetect.cpp
|
||||
Common/CPUDetect.h
|
||||
Common/Thunk.cpp
|
||||
Common/Thunk.h
|
||||
Common/x64Analyzer.cpp
|
||||
Common/x64Analyzer.h
|
||||
Common/x64Emitter.cpp
|
||||
Common/x64Emitter.h)
|
||||
elseif(MIPS)
|
||||
set(CommonExtra ${CommonExtra}
|
||||
Common/MipsCPUDetect.cpp
|
||||
Common/MipsEmitter.cpp
|
||||
Common/MipsEmitter.h)
|
||||
else()
|
||||
set(CommonExtra ${CommonExtra}
|
||||
set(CommonX86
|
||||
Common/ABI.cpp
|
||||
Common/ABI.h
|
||||
Common/CPUDetect.cpp
|
||||
Common/CPUDetect.h
|
||||
Common/Thunk.cpp
|
||||
Common/Thunk.h
|
||||
Common/x64Analyzer.cpp
|
||||
Common/x64Analyzer.h
|
||||
Common/x64Emitter.cpp
|
||||
Common/x64Emitter.h)
|
||||
source_group(x86 FILES ${CommonX86})
|
||||
|
||||
set(CommonARM
|
||||
Common/ArmCPUDetect.cpp
|
||||
Common/ArmEmitter.h
|
||||
Common/ArmEmitter.cpp
|
||||
Common/ColorConvNEON.cpp)
|
||||
source_group(ARM FILES ${CommonARM})
|
||||
|
||||
set(CommonARM64
|
||||
Common/Arm64Emitter.h
|
||||
Common/Arm64Emitter.cpp
|
||||
Common/ArmEmitter.h
|
||||
Common/ArmEmitter.cpp
|
||||
Core/Util/DisArm64.cpp)
|
||||
source_group(ARM64 FILES ${CommonARM64})
|
||||
|
||||
set(CommonMIPS
|
||||
Common/MipsCPUDetect.cpp
|
||||
Common/MipsEmitter.cpp
|
||||
Common/MipsEmitter.h)
|
||||
source_group(MIPS FILES ${CommonMIPS})
|
||||
|
||||
if(NOT (X86 OR ARM OR MIPS))
|
||||
set(CommonFake
|
||||
Common/FakeCPUDetect.cpp
|
||||
Common/FakeEmitter.h)
|
||||
source_group(Fake FILES ${CommonFake})
|
||||
endif()
|
||||
|
||||
if(UNITTEST)
|
||||
set(CommonExtra ${CommonExtra}
|
||||
Common/Arm64Emitter.h
|
||||
Common/Arm64Emitter.cpp
|
||||
Common/ArmEmitter.h
|
||||
Common/ArmEmitter.cpp
|
||||
Core/Util/DisArm64.cpp)
|
||||
else()
|
||||
#Blackberry appears to depend on this being here, should clean it up.
|
||||
set(CommonExtra ${CommonExtra}
|
||||
Common/ArmEmitter.h
|
||||
Common/ArmEmitter.cpp)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(CommonExtra ${CommonExtra}
|
||||
Common/stdafx.cpp
|
||||
Common/stdafx.h)
|
||||
endif()
|
||||
set(CommonWindows
|
||||
Common/stdafx.cpp
|
||||
Common/stdafx.h)
|
||||
source_group(Windows FILES ${CommonWindows})
|
||||
|
||||
add_library(Common STATIC
|
||||
${CommonExtra}
|
||||
${CommonX86}
|
||||
${CommonARM}
|
||||
${CommonARM64}
|
||||
${CommonMIPS}
|
||||
${CommonFake}
|
||||
${CommonWindows}
|
||||
Common/ColorConv.cpp
|
||||
Common/ColorConv.h
|
||||
Common/ChunkFile.cpp
|
||||
|
@ -15,6 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#if defined(_M_IX86) || defined(_M_X64)
|
||||
|
||||
#include "x64Emitter.h"
|
||||
#include "ABI.h"
|
||||
|
||||
@ -679,4 +681,4 @@ void XEmitter::ABI_RestoreStack(unsigned int /*frameSize*/) {
|
||||
|
||||
#endif // 32bit
|
||||
|
||||
|
||||
#endif // defined(_M_IX86) || defined(_M_X64)
|
||||
|
@ -18,6 +18,10 @@
|
||||
#include "CommonTypes.h"
|
||||
#include "CPUDetect.h"
|
||||
|
||||
#ifdef IOS
|
||||
#include <libkern/OSCacheControl.h>
|
||||
#endif
|
||||
|
||||
namespace Arm64Gen
|
||||
{
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
|
||||
#include <ctype.h>
|
||||
#include "Common.h"
|
||||
#include "CPUDetect.h"
|
||||
@ -299,3 +301,5 @@ std::string CPUInfo::Summarize()
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
#endif // defined(__arm__) || defined(__aarch64__)
|
||||
|
@ -15,6 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#if defined(_M_IX86) || defined(_M_X64)
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@ -285,3 +287,5 @@ std::string CPUInfo::Summarize()
|
||||
if (bLongMode) sum += ", 64-bit support";
|
||||
return sum;
|
||||
}
|
||||
|
||||
#endif // defined(_M_IX86) || defined(_M_X64)
|
||||
|
@ -15,15 +15,13 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
|
||||
#include <arm_neon.h>
|
||||
#include "ColorConvNEON.h"
|
||||
#include "Common.h"
|
||||
#include "CPUDetect.h"
|
||||
|
||||
#if !defined(ARM) && !defined(ARM64)
|
||||
#error Should not be compiled on non-ARM.
|
||||
#endif
|
||||
|
||||
// TODO: More NEON color conversion funcs.
|
||||
|
||||
void ConvertRGBA4444ToABGR4444NEON(u16 *dst, const u16 *src, const u32 numPixels) {
|
||||
@ -109,3 +107,5 @@ void ConvertRGB565ToBGR565NEON(u16 *dst, const u16 *src, const u32 numPixels) {
|
||||
ConvertRGB565ToBGR565Basic(dstp, srcp, numPixels - simdable);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // defined(__arm__) || defined(__aarch64__)
|
||||
|
@ -15,6 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifdef __mips__
|
||||
|
||||
#include "Common.h"
|
||||
#include "CPUDetect.h"
|
||||
#include "StringUtils.h"
|
||||
@ -196,3 +198,5 @@ std::string CPUInfo::Summarize()
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
#endif // __mips__
|
||||
|
@ -2,7 +2,10 @@
|
||||
// Common.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#endif
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
|
Loading…
Reference in New Issue
Block a user