summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/yuzu_cmd/CMakeLists.txt15
-rw-r--r--src/yuzu_cmd/yuzu.cpp7
2 files changed, 4 insertions, 18 deletions
diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt
index 57f9916f6..0b3f2cb54 100644
--- a/src/yuzu_cmd/CMakeLists.txt
+++ b/src/yuzu_cmd/CMakeLists.txt
@@ -4,26 +4,17 @@ add_executable(yuzu-cmd
4 config.cpp 4 config.cpp
5 config.h 5 config.h
6 default_ini.h 6 default_ini.h
7 emu_window/emu_window_sdl2_gl.cpp
8 emu_window/emu_window_sdl2_gl.h
9 emu_window/emu_window_sdl2.cpp 7 emu_window/emu_window_sdl2.cpp
10 emu_window/emu_window_sdl2.h 8 emu_window/emu_window_sdl2.h
11 emu_window/emu_window_sdl2_gl.cpp 9 emu_window/emu_window_sdl2_gl.cpp
12 emu_window/emu_window_sdl2_gl.h 10 emu_window/emu_window_sdl2_gl.h
11 emu_window/emu_window_sdl2_vk.cpp
12 emu_window/emu_window_sdl2_vk.h
13 resource.h 13 resource.h
14 yuzu.cpp 14 yuzu.cpp
15 yuzu.rc 15 yuzu.rc
16) 16)
17 17
18if (ENABLE_VULKAN)
19 target_sources(yuzu-cmd PRIVATE
20 emu_window/emu_window_sdl2_vk.cpp
21 emu_window/emu_window_sdl2_vk.h)
22
23 target_include_directories(yuzu-cmd PRIVATE ../../externals/Vulkan-Headers/include)
24 target_compile_definitions(yuzu-cmd PRIVATE HAS_VULKAN)
25endif()
26
27create_target_directory_groups(yuzu-cmd) 18create_target_directory_groups(yuzu-cmd)
28 19
29target_link_libraries(yuzu-cmd PRIVATE common core input_common) 20target_link_libraries(yuzu-cmd PRIVATE common core input_common)
@@ -33,6 +24,8 @@ if (MSVC)
33endif() 24endif()
34target_link_libraries(yuzu-cmd PRIVATE ${PLATFORM_LIBRARIES} SDL2 Threads::Threads) 25target_link_libraries(yuzu-cmd PRIVATE ${PLATFORM_LIBRARIES} SDL2 Threads::Threads)
35 26
27target_include_directories(yuzu-cmd PRIVATE ../../externals/Vulkan-Headers/include)
28
36if(UNIX AND NOT APPLE) 29if(UNIX AND NOT APPLE)
37 install(TARGETS yuzu-cmd RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") 30 install(TARGETS yuzu-cmd RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
38endif() 31endif()
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 1ebc04af5..2497c71ae 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -35,9 +35,7 @@
35#include "yuzu_cmd/config.h" 35#include "yuzu_cmd/config.h"
36#include "yuzu_cmd/emu_window/emu_window_sdl2.h" 36#include "yuzu_cmd/emu_window/emu_window_sdl2.h"
37#include "yuzu_cmd/emu_window/emu_window_sdl2_gl.h" 37#include "yuzu_cmd/emu_window/emu_window_sdl2_gl.h"
38#ifdef HAS_VULKAN
39#include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h" 38#include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h"
40#endif
41 39
42#ifdef _WIN32 40#ifdef _WIN32
43// windows.h needs to be included before shellapi.h 41// windows.h needs to be included before shellapi.h
@@ -173,13 +171,8 @@ int main(int argc, char** argv) {
173 emu_window = std::make_unique<EmuWindow_SDL2_GL>(&input_subsystem, fullscreen); 171 emu_window = std::make_unique<EmuWindow_SDL2_GL>(&input_subsystem, fullscreen);
174 break; 172 break;
175 case Settings::RendererBackend::Vulkan: 173 case Settings::RendererBackend::Vulkan:
176#ifdef HAS_VULKAN
177 emu_window = std::make_unique<EmuWindow_SDL2_VK>(&input_subsystem); 174 emu_window = std::make_unique<EmuWindow_SDL2_VK>(&input_subsystem);
178 break; 175 break;
179#else
180 LOG_CRITICAL(Frontend, "Vulkan backend has not been compiled!");
181 return 1;
182#endif
183 } 176 }
184 177
185 system.SetContentProvider(std::make_unique<FileSys::ContentProviderUnion>()); 178 system.SetContentProvider(std::make_unique<FileSys::ContentProviderUnion>());