cmake: Added citra_room_standalone target and ENABLE_ROOM_STANDALONE option

This commit is contained in:
OpenSauce04 2025-04-02 16:14:03 +01:00 committed by OpenSauce
parent 149d21921d
commit 6b3876b257
4 changed files with 29 additions and 1 deletions

View file

@ -86,7 +86,8 @@ option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
option(ENABLE_QT_UPDATE_CHECKER "Enable built-in update checker for the Qt frontend" OFF)
CMAKE_DEPENDENT_OPTION(ENABLE_TESTS "Enable generating tests executable" ON "NOT IOS" OFF)
CMAKE_DEPENDENT_OPTION(ENABLE_ROOM "Enable generating dedicated room executable" ON "NOT ANDROID AND NOT IOS" OFF)
CMAKE_DEPENDENT_OPTION(ENABLE_ROOM "Enable dedicated room functionality" ON "NOT ANDROID AND NOT IOS" OFF)
CMAKE_DEPENDENT_OPTION(ENABLE_ROOM_STANDALONE "Enable generating a standalone dedicated room executable" ON "ENABLE_ROOM" OFF)
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
option(ENABLE_SCRIPTING "Enable RPC server for scripting" ON)
@ -487,6 +488,9 @@ if (NOT ANDROID AND NOT IOS)
elseif (ENABLE_SDL2_FRONTEND)
bundle_target(citra_meta)
endif()
if (ENABLE_ROOM_STANDALONE)
bundle_target(citra_room_standalone)
endif()
endif()
# Installation instructions

View file

@ -199,6 +199,10 @@ if (ENABLE_ROOM)
add_subdirectory(citra_room)
endif()
if (ENABLE_ROOM_STANDALONE)
add_subdirectory(citra_room_standalone)
endif()
if (ANDROID)
add_subdirectory(android/app/src/main/jni)
target_include_directories(citra-android PRIVATE android/app/src/main)

View file

@ -0,0 +1,11 @@
add_executable(citra_room_standalone
citra_room_standalone.cpp
)
set_target_properties(citra_room_standalone PROPERTIES OUTPUT_NAME "azahar-room")
target_link_libraries(citra_room_standalone PRIVATE citra_room)
if(UNIX AND NOT APPLE)
install(TARGETS citra_room_standalone RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
endif()

View file

@ -0,0 +1,9 @@
// Copyright Citra Emulator Project / Azahar Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "citra_room/citra_room.h"
int main(int argc, char* argv[]) {
LaunchRoom(argc, argv);
}