mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-02-03 22:34:19 +01:00
* sys_net: don't use fds_bits from a system header on FreeBSD
rpcs3/Emu/Cell/Modules/sys_net.cpp:137:14: error: no member named '__fds_bits' in
'sys_net::fd_set'; did you mean 'fds_bits'?
if (src->fds_bits[i] & (1 << bit))
^~~~~~~~
fds_bits
/usr/include/sys/select.h:75:18: note: expanded from macro 'fds_bits'
#define fds_bits __fds_bits
^
rpcs3/Emu/Cell/Modules/sys_net.h:114:13: note: 'fds_bits' declared here
be_t<u32> fds_bits[32];
^
* GUI: fallback to xdg-open on other Unices
rpcs3/Gui/GameViewer.cpp:289:26: error: use of undeclared identifier 'command'
wxExecute(fmt::FromUTF8(command));
^
* File: FreeBSD never supported copyfile(3) but sendfile(2) works fine
Utilities/File.cpp:114:10: fatal error: 'copyfile.h' file not found
#include <copyfile.h>
^~~~~~~~~~~~
* Thread: add signal handling for BSDs
Utilities/Thread.cpp:761:23: error: use of undeclared identifier 'REG_RAX'
static const decltype(REG_RAX) reg_table[] =
^
Utilities/Thread.cpp:763:2: error: use of undeclared identifier 'REG_RAX'
REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
^
Utilities/Thread.cpp:763:11: error: use of undeclared identifier 'REG_RCX'
REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
^
Utilities/Thread.cpp:763:20: error: use of undeclared identifier 'REG_RDX'
REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
^
Utilities/Thread.cpp:763:29: error: use of undeclared identifier 'REG_RBX'
REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
^
Utilities/Thread.cpp:763:38: error: use of undeclared identifier 'REG_RSP'
REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
^
Utilities/Thread.cpp:763:47: error: use of undeclared identifier 'REG_RBP'
REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
^
Utilities/Thread.cpp:763:56: error: use of undeclared identifier 'REG_RSI'
REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
^
Utilities/Thread.cpp:763:65: error: use of undeclared identifier 'REG_RDI'
REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
^
Utilities/Thread.cpp:764:2: error: use of undeclared identifier 'REG_R8'
REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
^
Utilities/Thread.cpp:764:10: error: use of undeclared identifier 'REG_R9'
REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
^
Utilities/Thread.cpp:764:18: error: use of undeclared identifier 'REG_R10'
REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
^
Utilities/Thread.cpp:764:27: error: use of undeclared identifier 'REG_R11'
REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
^
Utilities/Thread.cpp:764:36: error: use of undeclared identifier 'REG_R12'
REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
^
Utilities/Thread.cpp:764:45: error: use of undeclared identifier 'REG_R13'
REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
^
Utilities/Thread.cpp:764:54: error: use of undeclared identifier 'REG_R14'
REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
^
Utilities/Thread.cpp:764:63: error: use of undeclared identifier 'REG_R15'
REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
^
Utilities/Thread.cpp:764:72: error: use of undeclared identifier 'REG_RIP'
REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
^
Utilities/Thread.cpp:792:26: error: no member named 'gregs' in '__mcontext'
const u64 reg_value = *X64REG(context, reg - X64R_RAX);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:804:21: error: no member named 'gregs' in '__mcontext'
out_value = (u8)(*X64REG(context, reg - X64R_AL));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:809:21: error: no member named 'gregs' in '__mcontext'
out_value = (u8)(*X64REG(context, reg - X64R_AH) >> 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:815:31: error: no member named 'gregs' in '__mcontext'
const s8 imm_value = *(s8*)(RIP(context) + i_size - 1);
^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:827:33: error: no member named 'gregs' in '__mcontext'
const s16 imm_value = *(s16*)(RIP(context) + i_size - 2);
^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:836:33: error: no member named 'gregs' in '__mcontext'
const s32 imm_value = *(s32*)(RIP(context) + i_size - 4);
^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:846:20: error: no member named 'gregs' in '__mcontext'
out_value = (u32)RCX(context);
^~~~~~~~~~~~
Utilities/Thread.cpp:779:18: note: expanded from macro 'RCX'
#define RCX(c) (*X64REG((c), 1))
^~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:851:19: error: no member named 'gregs' in '__mcontext'
const u32 _cf = EFLAGS(context) & 0x1;
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:851:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:852:19: error: no member named 'gregs' in '__mcontext'
const u32 _zf = EFLAGS(context) & 0x40;
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:852:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:853:19: error: no member named 'gregs' in '__mcontext'
const u32 _sf = EFLAGS(context) & 0x80;
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:853:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:854:19: error: no member named 'gregs' in '__mcontext'
const u32 _of = EFLAGS(context) & 0x800;
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:854:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:855:19: error: no member named 'gregs' in '__mcontext'
const u32 _pf = EFLAGS(context) & 0x4;
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:855:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:885:12: error: no member named 'gregs' in '__mcontext'
case 1: *X64REG(context, reg - X64R_RAX) = value & 0xff | *X64REG(context, re...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:885:62: error: no member named 'gregs' in '__mcontext'
...*X64REG(context, reg - X64R_RAX) = value & 0xff | *X64REG(context, reg - X64R_RAX) & 0xffffff...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:886:12: error: no member named 'gregs' in '__mcontext'
case 2: *X64REG(context, reg - X64R_RAX) = value & 0xffff | *X64REG(context, ...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:886:64: error: no member named 'gregs' in '__mcontext'
...reg - X64R_RAX) = value & 0xffff | *X64REG(context, reg - X64R_RAX) & 0xffff0000; return true;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:887:12: error: no member named 'gregs' in '__mcontext'
case 4: *X64REG(context, reg - X64R_RAX) = value & 0xffffffff; return true;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:888:12: error: no member named 'gregs' in '__mcontext'
case 8: *X64REG(context, reg - X64R_RAX) = value; return true;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:913:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) |= 0x1; // set CF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:913:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:917:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) &= ~0x1; // clear CF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:917:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:922:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) |= 0x40; // set ZF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:922:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:926:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) &= ~0x40; // clear ZF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:926:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:931:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) |= 0x80; // set SF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:931:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:935:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) &= ~0x80; // clear SF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:935:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:940:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) |= 0x800; // set OF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:940:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:944:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) &= ~0x800; // clear OF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:944:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:953:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) |= 0x4; // set PF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:953:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:957:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) &= ~0x4; // clear PF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:957:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:962:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) |= 0x10; // set AF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:962:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:966:3: error: no member named 'gregs' in '__mcontext'
EFLAGS(context) &= ~0x10; // clear AF
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:966:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:976:7: error: no member named 'gregs' in '__mcontext'
if (EFLAGS(context) & 0x400 /* direction flag */)
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:976:7: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
^
Utilities/Thread.cpp:1020:25: error: no member named 'gregs' in '__mcontext'
auto code = (const u8*)RIP(context);
^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:1146:3: error: no member named 'gregs' in '__mcontext'
RIP(context) += i_size;
^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:1368:47: error: no member named 'gregs' in '__mcontext'
const bool is_writing = context->uc_mcontext.gregs[REG_ERR] & 0x2;
~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:1368:53: error: use of undeclared identifier 'REG_ERR'
const bool is_writing = context->uc_mcontext.gregs[REG_ERR] & 0x2;
^
Utilities/Thread.cpp:1393:89: error: no member named 'gregs' in '__mcontext'
...%s location %p at %p.", cause, info->si_addr, RIP(context)));
^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
~~~~~~~~~~~~~~~~~~~~~~ ^
* Thread: add explict casts for incomplete pthread_t on some platforms
Utilities/Thread.cpp:1467:17: error: no viable overloaded '='
ctrl->m_thread = thread;
~~~~~~~~~~~~~~ ^ ~~~~~~
Utilities/Atomic.h:776:12: note: candidate function not viable: cannot convert argument of
incomplete type 'pthread_t' (aka 'pthread *') to 'const atomic_t<unsigned long>' for 1st
argument
atomic_t& operator =(const atomic_t&) = delete;
^
Utilities/Atomic.h:902:7: note: candidate function not viable: cannot convert argument of
incomplete type 'pthread_t' (aka 'pthread *') to 'const type' (aka 'const unsigned long') for
1st argument
type operator =(const type& rhs)
^
Utilities/Thread.cpp:1656:3: error: no matching function for call to 'pthread_detach'
pthread_detach(m_thread.raw());
^~~~~~~~~~~~~~
/usr/include/pthread.h:218:6: note: candidate function not viable: no known conversion from 'type'
(aka 'unsigned long') to 'pthread_t' (aka 'pthread *') for 1st argument
int pthread_detach(pthread_t);
^
* build: dlopen() maybe in libc
/usr/bin/ld: cannot find -ldl
c++: error: linker command failed with exit code 1 (use -v to see invocation)
* build: iconv() maybe available on some BSDs in libc
/usr/bin/ld: cannot find -liconv
c++: error: linker command failed with exit code 1 (use -v to see invocation)
* build: hidapi-hidraw is only built on Linux
/usr/bin/ld: cannot find -lhidapi-hidraw
c++: error: linker command failed with exit code 1 (use -v to see invocation)
* Thread: use getrusage() on more POSIX-like systems
* Qt: don't return NULL handle on other platforms
rpcs3/rpcs3qt/gs_frame.cpp:120:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
* build: properly disable Vulkan on other platforms
In file included from rpcs3/rpcs3_app.cpp:40:
In file included from rpcs3/Emu/RSX/VK/VKGSRender.h:3:
rpcs3/Emu/RSX/VK/VKHelpers.h:1209:42: error: unknown type name 'device_queues'
std::vector<VkBool32> supportsPresent(device_queues);
^
rpcs3/Emu/RSX/VK/VKHelpers.h:1211:4: error: expected member name or ';' after declaration specifiers
for (u32 index = 0; index < device_queues; index++)
^
rpcs3/Emu/RSX/VK/VKHelpers.h:1221:4: error: expected member name or ';' after declaration specifiers
for (u32 i = 0; i < device_queues; i++)
^
rpcs3/Emu/RSX/VK/VKHelpers.h:1256:4: error: expected member name or ';' after declaration specifiers
if (graphicsQueueNodeIndex != presentQueueNodeIndex)
^
rpcs3/Emu/RSX/VK/VKHelpers.h:1261:4: error: expected member name or ';' after declaration specifiers
CHECK_RESULT(vkGetPhysicalDeviceSurfaceFormatsKHR(dev, surface, &formatCount, nullptr));
^
[...]
/usr/bin/ld: cannot find -lvulkan
c++: error: linker command failed with exit code 1 (use -v to see invocation)
* build: make install/strip work by moving commands
* Qt: create surface for GL context if it wasn't ready
#0 strlen (str=0x0) at /usr/src/lib/libc/string/strlen.c:100
#1 0x000000000090f02e in std::__1::char_traits<char>::length (__s=0x0)
at /usr/include/c++/v1/__string:215
#2 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string (__s=0x0, this=<optimized out>) at /usr/include/c++/v1/string:1547
#3 gl::capabilities::initialize (this=0x2ba32a0 <gl::g_driver_caps>)
at rpcs3/Emu/RSX/GL/GLHelpers.h:133
#4 0x000000000090d3dd in gl::get_driver_caps () at rpcs3/Emu/RSX/GL/GLHelpers.cpp:56
#5 0x00000000008fa511 in GLGSRender::on_init_thread (this=0x838d30018)
at rpcs3/Emu/RSX/GL/GLGSRender.cpp:484
#6 0x0000000000938f9e in rsx:🧵:on_task (this=0x838d30018)
at rpcs3/Emu/RSX/RSXThread.cpp:334
#7 0x0000000000abc329 in task_stack::task_type<named_thread::start_thread(std::__1::shared_ptr<void> const&)::$_10>::invoke() ()
#8 0x0000000000abc114 in thread_ctrl::start(std::__1::shared_ptr<thread_ctrl> const&, task_stack)::$_7::__invoke(void*) ()
#9 0x0000000801e60c35 in thread_start (curthread=0x843650a00)
at /usr/src/lib/libthr/thread/thr_create.c:289
#10 0x0000000000000000 in ?? ()
* build: don't abort without git metadata
-- Found Git: /usr/local/bin/git (found version "2.13.1")
fatal: Not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Warning at git-version.cmake:12 (message):
git rev-list failed, unable to include version.
* build: non-parallel needs git-version.h earlier
rpcs3/rpcs3_version.cpp:3:10: fatal error: 'git-version.h' file not found
#include "git-version.h"
^~~~~~~~~~~~~~~
1 error generated.
345 lines
12 KiB
CMake
345 lines
12 KiB
CMake
cmake_minimum_required(VERSION 2.8.12)
|
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
|
|
set(RES_FILES "")
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
# Qt section
|
|
find_package(Qt5 5.8 COMPONENTS Widgets)
|
|
if (WIN32)
|
|
find_package(Qt5WinExtras REQUIRED)
|
|
set(RPCS3_QT_LIBS Qt5::Widgets Qt5::WinExtras)
|
|
include_directories(${Qt5Widgets_INCLUDE_DIRS} ${Qt5WinExtras_INCLUDE_DIRS})
|
|
else()
|
|
set(RPCS3_QT_LIBS Qt5::Widgets)
|
|
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
|
endif()
|
|
|
|
# Let's make sure we have Qt before we continue
|
|
if (NOT Qt5Widgets_FOUND)
|
|
if (Qt5Widgets_VERSION VERSION_LESS 5.8.0)
|
|
message("Minimum supported Qt5 version is 5.8! You have version ${Qt5Widgets_VERSION} installed, please upgrade!")
|
|
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
|
|
message(FATAL_ERROR "Most distros do not provide an up-to-date version of Qt.
|
|
If you're on Ubuntu or Linux Mint, there are PPAs you can use to install an up-to-date qt5 version.
|
|
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt59-xenial
|
|
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt59-trusty
|
|
just make sure to run
|
|
source /opt/qt59/bin/qt59-env.sh
|
|
before re-running cmake")
|
|
elseif(WIN32)
|
|
message(FATAL_ERROR "You can download the latest version of Qt5 here: https://www.qt.io/download-open-source/")
|
|
else()
|
|
message(FATAL_ERROR "Look online for instructions on installing an up-to-date Qt5 on ${CMAKE_SYSTEM}.")
|
|
endif()
|
|
|
|
endif()
|
|
|
|
message("CMake was unable to find Qt5!")
|
|
if (WIN32)
|
|
message(FATAL_ERROR "Make sure the QTDIR env variable has been set properly. (for example C:\\Qt\\5.8\\msvc2017_64\\)")
|
|
elseif("${CMAKE_SYSTEM}" MATCHES "Linux")
|
|
message(FATAL_ERROR "Make sure to install your distro's qt5 package!")
|
|
else()
|
|
message(FATAL_ERROR "You need to have Qt5 installed, look online for instructions on installing Qt5 on ${CMAKE_SYSTEM}.")
|
|
endif()
|
|
endif()
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
set(CMAKE_AUTOMOC ON)
|
|
if (Qt5_POSITION_INDEPENDENT_CODE)
|
|
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
if(UNIX)
|
|
# Cotire needs this set for some reason
|
|
SET(CMAKE_CXX_COMPILE_OPTIONS_PIE -fPIC)
|
|
endif()
|
|
endif()
|
|
|
|
include(cotire)
|
|
|
|
project(rpcs3)
|
|
|
|
# Generate git-version.h at build time.
|
|
add_custom_target(GitVersion ALL
|
|
DEPENDS something_that_never_exists)
|
|
add_custom_command(OUTPUT something_that_never_exists
|
|
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
|
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake)
|
|
|
|
# Check for a sufficient compiler and set build options
|
|
include(ConfigureCompiler)
|
|
|
|
if(WIN32)
|
|
add_definitions(-DUNICODE)
|
|
add_definitions(-D_WIN32_WINNT=0x0601)
|
|
set(RES_FILES "rpcs3.rc")
|
|
else()
|
|
add_definitions(-DGL_GLEXT_PROTOTYPES)
|
|
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
|
|
endif()
|
|
|
|
if(NOT MSVC)
|
|
if($ENV{CI})
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O1") # fix for travis gcc OoM crash. Might be fixed with the move to containers.
|
|
endif()
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
|
|
if(WIN32)
|
|
set(CMAKE_RC_COMPILER_INIT windres)
|
|
enable_language(RC)
|
|
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
|
|
|
# Workaround for mingw64 (MSYS2)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--allow-multiple-definition")
|
|
endif()
|
|
|
|
add_compile_options(-msse -msse2 -mcx16 -mssse3)
|
|
|
|
find_package(GLEW REQUIRED)
|
|
find_package(ZLIB REQUIRED)
|
|
else()
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:throwingNew /D _CRT_SECURE_NO_DEPRECATE=1 /D _CRT_NON_CONFORMING_SWPRINTFS=1 /D _SCL_SECURE_NO_WARNINGS=1")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /BASE:0x10000 /FIXED")
|
|
endif()
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
#on some Linux distros shm_unlink and similar functions are in librt only
|
|
set(ADDITIONAL_LIBS "rt" "X11" "asound")
|
|
elseif(NOT MSVC AND NOT CMAKE_CXX_FLAGS MATCHES "LIBICONV_PLUG")
|
|
#it seems like glibc includes the iconv functions we use but other libc
|
|
#implementations like the one on OSX don't seem implement them
|
|
set(ADDITIONAL_LIBS "iconv")
|
|
else()
|
|
set(ADDITIONAL_LIBS "")
|
|
endif()
|
|
|
|
if(NOT RPCS3_SRC_DIR)
|
|
SET(RPCS3_SRC_DIR ${CMAKE_CURRENT_LIST_DIR})
|
|
Message("-- Initializing RPCS3_SRC_DIR=${RPCS3_SRC_DIR}")
|
|
else()
|
|
Message("-- Using Custom RPCS3_SRC_DIR=${RPCS3_SRC_DIR}")
|
|
endif()
|
|
|
|
set(CMAKE_MODULE_PATH "${RPCS3_SRC_DIR}/cmake_modules")
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
find_package(OpenAL REQUIRED)
|
|
if (NOT WITHOUT_LLVM)
|
|
find_package(LLVM 4.0 CONFIG)
|
|
endif()
|
|
|
|
|
|
if(APPLE)
|
|
set(PLATFORM_ARCH "macosx/x86_64")
|
|
elseif(WIN32)
|
|
set(PLATFORM_ARCH "Windows/x86_64")
|
|
else()
|
|
set(PLATFORM_ARCH "linux/x86_64")
|
|
endif()
|
|
|
|
# Select the version of libpng to use, default is builtin
|
|
if(USE_SYSTEM_LIBPNG)
|
|
message("-- RPCS3: using shared libpng")
|
|
find_package(PNG REQUIRED)
|
|
include_directories("${PNG_INCLUDE_DIRS}")
|
|
else()
|
|
message("-- RPCS3: using builtin libpng")
|
|
include_directories("${RPCS3_SRC_DIR}/../3rdparty/libpng")
|
|
endif()
|
|
|
|
# Select the version of ffmpeg to use, default is builtin
|
|
if(USE_SYSTEM_FFMPEG)
|
|
message("-- RPCS3: using shared ffmpeg")
|
|
find_package(FFMPEG REQUIRED)
|
|
include_directories("${FFMPEG_INCLUDE_DIR}")
|
|
else()
|
|
message("-- RPCS3: using builtin ffmpeg")
|
|
include_directories("${RPCS3_SRC_DIR}/../3rdparty/ffmpeg/${PLATFORM_ARCH}/include")
|
|
endif()
|
|
|
|
include_directories(
|
|
${GLEW_INCLUDE_DIR}
|
|
${ZLIB_INCLUDE_DIR}
|
|
${OPENAL_INCLUDE_DIR}
|
|
${LLVM_INCLUDE_DIRS}
|
|
"${RPCS3_SRC_DIR}/../3rdparty/pugixml/src"
|
|
"${RPCS3_SRC_DIR}"
|
|
"${RPCS3_SRC_DIR}/Loader"
|
|
"${RPCS3_SRC_DIR}/Crypto"
|
|
"${RPCS3_SRC_DIR}/.."
|
|
"${RPCS3_SRC_DIR}/../Utilities/yaml-cpp/include"
|
|
"${RPCS3_SRC_DIR}/../asmjit/src/asmjit"
|
|
"${RPCS3_SRC_DIR}/../3rdparty/GSL/include"
|
|
"${RPCS3_SRC_DIR}/../Vulkan/Vulkan-LoaderAndValidationLayers/include"
|
|
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/Public"
|
|
"${RPCS3_SRC_DIR}/../Vulkan/glslang/"
|
|
"${RPCS3_SRC_DIR}/../3rdparty/hidapi/hidapi"
|
|
# Includes 3rdparty stuff that isn't included yet
|
|
"${RPCS3_SRC_DIR}/../3rdparty/GL"
|
|
"${RPCS3_SRC_DIR}/../3rdparty/stblib"
|
|
"${RPCS3_SRC_DIR}/../3rdparty/cereal/include"
|
|
)
|
|
|
|
if(WIN32)
|
|
# Slimmed down version of minidx9 for XAudio2_7 only
|
|
include_directories(BEFORE "${RPCS3_SRC_DIR}/../3rdparty/XAudio2_7")
|
|
include_directories(BEFORE "${RPCS3_SRC_DIR}/../3rdparty/minidx12/Include")
|
|
endif()
|
|
|
|
if(NOT LLVM_FOUND)
|
|
Message("LLVM 4.0 not found. RPCS3 will be compiled without LLVM support.")
|
|
else()
|
|
add_definitions(${LLVM_DEFINITIONS})
|
|
add_definitions(-DLLVM_AVAILABLE)
|
|
|
|
#Use static linking for windows binary but always dynamic on *nix
|
|
if (WIN32)
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler)
|
|
else()
|
|
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler mcdisassembler)
|
|
endif()
|
|
else()
|
|
set(LLVM_LIBS LLVM)
|
|
endif()
|
|
|
|
if (NOT MSVC)
|
|
set_source_files_properties(${RPCS3_SRC_DIR}/../Utilities/JIT.cpp PROPERTIES COMPILE_FLAGS -fno-rtti)
|
|
set_source_files_properties(${RPCS3_SRC_DIR}/Emu/Cell/PPUTranslator.cpp PROPERTIES COMPILE_FLAGS -fno-rtti)
|
|
endif()
|
|
endif()
|
|
|
|
link_directories(
|
|
"${RPCS3_SRC_DIR}/../3rdparty/minidx12/"
|
|
"${RPCS3_SRC_DIR}/../Vulkan"
|
|
)
|
|
|
|
|
|
if(NOT USE_SYSTEM_FFMPEG)
|
|
if(MSVC OR NOT WIN32)
|
|
link_directories("${RPCS3_SRC_DIR}/../3rdparty/ffmpeg/${PLATFORM_ARCH}/lib")
|
|
endif()
|
|
endif()
|
|
|
|
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
|
|
foreach(dir ${dirs})
|
|
message(STATUS "dir='${dir}'")
|
|
endforeach()
|
|
|
|
file(
|
|
GLOB_RECURSE
|
|
RPCS3_SRC
|
|
"${RPCS3_SRC_DIR}/*.cpp"
|
|
"${RPCS3_SRC_DIR}/../Utilities/*.cpp"
|
|
"${RPCS3_SRC_DIR}/../asmjit/src/asmjit/*.cpp"
|
|
)
|
|
|
|
if (NOT WIN32 AND "${CMAKE_SYSTEM}" MATCHES "Linux")
|
|
# Compile glslang and SPIRV modules needed for glsl compilation
|
|
file(
|
|
GLOB_RECURSE
|
|
UNIX_GLSLANG
|
|
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/GenericCodeGen/*.cpp"
|
|
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/MachineIndependent/*.cpp"
|
|
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/OSDependent/Unix/*.cpp"
|
|
"${RPCS3_SRC_DIR}/../Vulkan/glslang/OGLCompilersDLL/*.cpp"
|
|
"${RPCS3_SRC_DIR}/../Vulkan/glslang/hlsl/*.cpp"
|
|
"${RPCS3_SRC_DIR}/../Vulkan/glslang/SPIRV/*.cpp"
|
|
)
|
|
|
|
set (RPCS3_SRC ${RPCS3_SRC} ${UNIX_GLSLANG})
|
|
endif()
|
|
|
|
#File exclusion section
|
|
|
|
#Ignore vulkan if not on windows or linux
|
|
if(NOT WIN32 AND NOT "${CMAKE_SYSTEM}" MATCHES "Linux")
|
|
set (EXCLUDE_FILES "/RSX/VK/")
|
|
endif()
|
|
|
|
# The Gui folder contains wxWidgets stuff, which we no longer want.
|
|
set (EXCLUDE_FILES ${EXCLUDE_FILES} "/Gui/")
|
|
|
|
# Ignore autogenerated moc_* files if present
|
|
set (EXCLUDE_FILES ${EXCLUDE_FILES} "moc_")
|
|
set (EXCLUDE_FILES ${EXCLUDE_FILES} "rpcs3_automoc")
|
|
|
|
foreach (TMP_PATH ${RPCS3_SRC})
|
|
foreach (EXCLUDE_PATH ${EXCLUDE_FILES})
|
|
string (FIND ${TMP_PATH} ${EXCLUDE_PATH} EXCLUDE_FILE_FOUND)
|
|
if (NOT ${EXCLUDE_FILE_FOUND} EQUAL -1)
|
|
list (REMOVE_ITEM RPCS3_SRC ${TMP_PATH})
|
|
endif ()
|
|
endforeach(EXCLUDE_PATH)
|
|
endforeach(TMP_PATH)
|
|
|
|
# Remove the Qt moc files as part of clean, they are compiled when generating automoc
|
|
file(GLOB_RECURSE TMP_MOC "${RPCS3_SRC_DIR}/moc_*.cpp" "${RPCS3_SRC_DIR}/rpcs3_automoc.cpp")
|
|
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${TMP_MOC}")
|
|
|
|
if (WIN32)
|
|
add_executable(rpcs3 WIN32 ${RPCS3_SRC} ${RES_FILES} resources.qrc)
|
|
else()
|
|
add_executable(rpcs3 ${RPCS3_SRC} ${RES_FILES} resources.qrc)
|
|
endif()
|
|
|
|
add_dependencies(rpcs3 GitVersion)
|
|
|
|
if(WIN32)
|
|
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL setupapi.lib hidapi-hid Shlwapi.lib)
|
|
if(NOT MSVC)
|
|
target_link_libraries(rpcs3 ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} opengl32.lib glu32.lib libpthread)
|
|
else()
|
|
target_link_libraries(rpcs3 dxgi.lib d2d1.lib dwrite.lib)
|
|
endif()
|
|
target_link_libraries(rpcs3 avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib png16_static ${OPENAL_LIBRARY} ${ADDITIONAL_LIBS})
|
|
else()
|
|
target_link_libraries(rpcs3 ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
target_link_libraries(rpcs3 hidapi-hidraw udev vulkan)
|
|
else()
|
|
target_link_libraries(rpcs3 hidapi-libusb usb)
|
|
endif()
|
|
target_link_libraries(rpcs3 ${CMAKE_DL_LIBS} -lpthread ${ZLIB_LIBRARIES} ${ADDITIONAL_LIBS})
|
|
if (USE_SYSTEM_FFMPEG)
|
|
link_libraries(${FFMPEG_LIBRARY_DIR})
|
|
target_link_libraries(rpcs3 libavformat.so libavcodec.so libavutil.so libswresample.so libswscale.so)
|
|
else()
|
|
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a)
|
|
endif()
|
|
if (USE_SYSTEM_LIBPNG)
|
|
target_link_libraries(rpcs3 ${PNG_LIBRARIES})
|
|
else()
|
|
target_link_libraries(rpcs3 png16_static)
|
|
endif()
|
|
endif()
|
|
|
|
# For some reason GCC 7 requires manually linking with -latomic
|
|
if (CMAKE_COMPILER_IS_GNUCC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7))
|
|
target_link_libraries(rpcs3 -latomic)
|
|
endif()
|
|
|
|
if(LLVM_FOUND)
|
|
target_link_libraries(rpcs3 ${LLVM_LIBS})
|
|
endif()
|
|
|
|
target_link_libraries(rpcs3 ${RPCS3_QT_LIBS})
|
|
|
|
set_target_properties(rpcs3 PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${RPCS3_SRC_DIR}/stdafx.h")
|
|
|
|
cotire(rpcs3)
|
|
|
|
# Unix installation
|
|
if(UNIX AND NOT APPLE)
|
|
# Install the binary
|
|
install(TARGETS rpcs3 RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
|
# Install the application icon and menu item
|
|
install(FILES rpcs3.svg
|
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps)
|
|
install(FILES rpcs3.png
|
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps)
|
|
install(FILES rpcs3.desktop
|
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
|
endif()
|