summarylogtreecommitdiffstats
path: root/use-system-libs.patch
blob: 74fea195a6f4cc358b6922a8070576bb6670dc07 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake
index fcd341238..6641a0316 100644
--- a/cmake/BuildParameters.cmake
+++ b/cmake/BuildParameters.cmake
@@ -17,14 +17,12 @@ if(LIBRETRO)
 	set(USE_DISCORD_PRESENCE FALSE)
 	set(USE_ACHIEVEMENTS OFF)
 	set(QT_BUILD OFF)
-	set(USE_SYSTEM_LIBS OFF)
 	add_definitions(-D__LIBRETRO__)
 endif()
 optional_system_library(fmt)
 optional_system_library(ryml)
 optional_system_library(zstd)
 optional_system_library(libzip)
-optional_system_library(SDL2)
 option(LTO_PCSX2_CORE "Enable LTO/IPO/LTCG on the subset of pcsx2 that benefits most from it but not anything else")
 
 
diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index 1f986efd2..8aacf7b4f 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -79,7 +79,6 @@ else()
 	check_lib(SOUNDTOUCH SoundTouch SoundTouch.h PATH_SUFFIXES soundtouch)
 
 	if(NOT QT_BUILD AND NOT APPLE)
-		find_optional_system_library(SDL2 3rdparty/sdl2 2.0.12)
 	endif()
 
 	if(UNIX AND NOT APPLE)
@@ -90,7 +89,6 @@ else()
 			find_package(Wayland REQUIRED)
 		endif()
 
-		find_package(Libbacktrace)
 	endif()
 endif(WIN32)
 
@@ -176,8 +174,7 @@ if(NOT WIN32 AND QT_BUILD)
 	find_package(CURL REQUIRED)
 endif()
 
-add_subdirectory(3rdparty/lzma EXCLUDE_FROM_ALL)
-add_subdirectory(3rdparty/libchdr EXCLUDE_FROM_ALL)
+check_lib(LIBCHDR libchdr libchdr/chd.h)
 
 # rapidyaml includes fast_float as a submodule, saves us pulling it in directly.
 # Normally, we'd just pull in the cmake project, and link to it, but... it seems to enable
@@ -191,7 +188,6 @@ add_subdirectory(3rdparty/jpgd EXCLUDE_FROM_ALL)
 add_subdirectory(3rdparty/simpleini EXCLUDE_FROM_ALL)
 add_subdirectory(3rdparty/imgui EXCLUDE_FROM_ALL)
 add_subdirectory(3rdparty/cpuinfo EXCLUDE_FROM_ALL)
-add_subdirectory(3rdparty/zydis EXCLUDE_FROM_ALL)
 
 if(USE_OPENGL)
 	add_subdirectory(3rdparty/glad EXCLUDE_FROM_ALL)
diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt
index b25010517..2dfba1a5e 100644
--- a/pcsx2/CMakeLists.txt
+++ b/pcsx2/CMakeLists.txt
@@ -1165,12 +1165,10 @@ target_link_libraries(PCSX2_FLAGS INTERFACE
 	imgui
 	fmt::fmt
 	ryml
-	chdr-static
+	PkgConfig::LIBCHDR
 	libzip::zip
 	cpuinfo
-	zydis
 	ZLIB::ZLIB
-	PkgConfig::SOUNDTOUCH
 	PNG::PNG
 	LibLZMA::LibLZMA
 	Zstd::Zstd