mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	web_service: Add CMake flag to enable.
This commit is contained in:
		
							parent
							
								
									8af3ebb149
								
							
						
					
					
						commit
						33b012e86b
					
				
					 5 changed files with 32 additions and 14 deletions
				
			
		|  | @ -14,4 +14,6 @@ endif() | |||
| if (ENABLE_QT) | ||||
|     add_subdirectory(citra_qt) | ||||
| endif() | ||||
| add_subdirectory(web_service) | ||||
| if (ENABLE_WEB_SERVICE) | ||||
|     add_subdirectory(web_service) | ||||
| endif() | ||||
|  |  | |||
|  | @ -386,5 +386,8 @@ set(HEADERS | |||
| 
 | ||||
| create_directory_groups(${SRCS} ${HEADERS}) | ||||
| add_library(core STATIC ${SRCS} ${HEADERS}) | ||||
| target_link_libraries(core PUBLIC common PRIVATE audio_core video_core web_service) | ||||
| target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) | ||||
| target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt) | ||||
| if (ENABLE_WEB_SERVICE) | ||||
|     target_link_libraries(core PUBLIC json-headers web_service) | ||||
| endif() | ||||
|  |  | |||
|  | @ -6,13 +6,19 @@ | |||
| 
 | ||||
| #include "common/scm_rev.h" | ||||
| #include "core/telemetry_session.h" | ||||
| #include "web_services/telemetry_json.h" | ||||
| 
 | ||||
| #ifdef ENABLE_WEB_SERVICE | ||||
| #include "web_service/telemetry_json.h" | ||||
| #endif | ||||
| 
 | ||||
| namespace Core { | ||||
| 
 | ||||
| TelemetrySession::TelemetrySession() { | ||||
| #ifdef ENABLE_WEB_SERVICE | ||||
|     backend = std::make_unique<WebService::TelemetryJson>(); | ||||
| 
 | ||||
| #else | ||||
|     backend = std::make_unique<Telemetry::NullVisitor>(); | ||||
| #endif | ||||
|     // Log one-time session start information
 | ||||
|     const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; | ||||
|     const auto start_time{std::chrono::duration_cast<std::chrono::microseconds>(duration).count()}; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue