aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/citra/files/patch-CMakeLists.txt
blob: 57c9d442a24497641c6469a7478309b36cd46546 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
citra-qt currently needs SDL for audio and input

--- CMakeLists.txt.orig	2022-09-01 18:37:46 UTC
+++ CMakeLists.txt
@@ -71,7 +71,6 @@ endfunction()
         endif()
     endforeach()
 endfunction()
-check_submodules_present()
 
 configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc
                ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc
@@ -168,15 +167,15 @@ if (ENABLE_SDL2)
     else()
         find_package(SDL2 REQUIRED)
     endif()
-
-    if (SDL2_FOUND)
-        # TODO(yuriks): Make FindSDL2.cmake export an IMPORTED library instead
-        add_library(SDL2 INTERFACE)
-        target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}")
-        target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
-    endif()
 else()
-    set(SDL2_FOUND NO)
+    find_package(SDL2)
+endif()
+
+if (SDL2_FOUND)
+  # TODO(yuriks): Make FindSDL2.cmake export an IMPORTED library instead
+  add_library(SDL2 INTERFACE)
+  target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}")
+  target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
 endif()
 
 if (ENABLE_QT)