mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 04:40:05 +00:00
Merge pull request #4262 from EverOddish/master
Added CMake option to enable/disable scripting support
This commit is contained in:
commit
1f9f220a3e
5 changed files with 120 additions and 94 deletions
|
@ -410,14 +410,6 @@ add_library(core STATIC
|
|||
movie.h
|
||||
perf_stats.cpp
|
||||
perf_stats.h
|
||||
rpc/packet.cpp
|
||||
rpc/packet.h
|
||||
rpc/rpc_server.cpp
|
||||
rpc/rpc_server.h
|
||||
rpc/server.cpp
|
||||
rpc/server.h
|
||||
rpc/zmq_server.cpp
|
||||
rpc/zmq_server.h
|
||||
settings.cpp
|
||||
settings.h
|
||||
telemetry_session.cpp
|
||||
|
@ -426,6 +418,18 @@ add_library(core STATIC
|
|||
tracer/recorder.cpp
|
||||
tracer/recorder.h
|
||||
)
|
||||
if (ENABLE_SCRIPTING)
|
||||
target_sources(core PRIVATE
|
||||
rpc/packet.cpp
|
||||
rpc/packet.h
|
||||
rpc/rpc_server.cpp
|
||||
rpc/rpc_server.h
|
||||
rpc/server.cpp
|
||||
rpc/server.h
|
||||
rpc/zmq_server.cpp
|
||||
rpc/zmq_server.h
|
||||
)
|
||||
endif()
|
||||
|
||||
create_target_directory_groups(core)
|
||||
|
||||
|
@ -445,4 +449,6 @@ if (ARCHITECTURE_x86_64)
|
|||
target_link_libraries(core PRIVATE dynarmic)
|
||||
endif()
|
||||
|
||||
target_link_libraries(core PUBLIC libzmq-headers cppzmq-headers libzmq)
|
||||
if (ENABLE_SCRIPTING)
|
||||
target_link_libraries(core PUBLIC libzmq-headers cppzmq-headers libzmq)
|
||||
endif()
|
||||
|
|
|
@ -25,7 +25,9 @@
|
|||
#include "core/loader/loader.h"
|
||||
#include "core/memory_setup.h"
|
||||
#include "core/movie.h"
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
#include "core/rpc/rpc_server.h"
|
||||
#endif
|
||||
#include "core/settings.h"
|
||||
#include "network/network.h"
|
||||
#include "video_core/video_core.h"
|
||||
|
@ -182,7 +184,11 @@ System::ResultStatus System::Init(EmuWindow& emu_window, u32 system_mode) {
|
|||
dsp_core->EnableStretching(Settings::values.enable_audio_stretching);
|
||||
|
||||
telemetry_session = std::make_unique<Core::TelemetrySession>();
|
||||
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
rpc_server = std::make_unique<RPC::RPCServer>();
|
||||
#endif
|
||||
|
||||
service_manager = std::make_shared<Service::SM::ServiceManager>();
|
||||
shared_page_handler = std::make_shared<SharedPage::Handler>();
|
||||
|
||||
|
@ -234,7 +240,9 @@ void System::Shutdown() {
|
|||
Kernel::Shutdown();
|
||||
HW::Shutdown();
|
||||
telemetry_session.reset();
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
rpc_server.reset();
|
||||
#endif
|
||||
service_manager.reset();
|
||||
dsp_core.reset();
|
||||
cpu_core.reset();
|
||||
|
|
|
@ -21,9 +21,11 @@ namespace AudioCore {
|
|||
class DspInterface;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
namespace RPC {
|
||||
class RPCServer;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace Service {
|
||||
namespace SM {
|
||||
|
@ -220,8 +222,10 @@ private:
|
|||
/// Frontend applets
|
||||
std::shared_ptr<Frontend::SoftwareKeyboard> registered_swkbd;
|
||||
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
/// RPC Server for scripting support
|
||||
std::unique_ptr<RPC::RPCServer> rpc_server;
|
||||
#endif
|
||||
|
||||
/// Shared Page
|
||||
std::shared_ptr<SharedPage::Handler> shared_page_handler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue