summarylogtreecommitdiffstats
path: root/use-system-libs.patch
blob: b86bf8cf3ce77382aefb92afdc17196fac58910b (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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9328d8c8..3e5106141 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,7 +41,6 @@ get_git_version_info()
 write_svnrev_h()
 add_definitions(-D__LIBRETRO__)
 
-add_subdirectory(3rdparty/wxwidgets3.0)
 
 # make common
 if(common_libs)
diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index da6eba91e..2400785f3 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -16,8 +16,7 @@ find_package(LibLZMA)
 set(OpenGL_GL_PREFERENCE GLVND)
 find_package(OpenGL)
 find_package(PNG)
-set(wxWidgets_FOUND 1)
-set(wxWidgets_USE_FILE 3rdparty/wxwidgets3.0/UsewxWidgets.cmake)
+find_package(wxWidgets COMPONENTS core CONFIG)
 find_package(ZLIB)
 
 ## Use pcsx2 package to find module
@@ -51,7 +50,7 @@ if(OPENGL_FOUND)
 endif()
 
 if(wxWidgets_FOUND)
-	include(${wxWidgets_USE_FILE})
+	set(wxWidgets_LIBRARIES wx::core)
 endif()
 
 if(PCAP_FOUND)
@@ -114,7 +113,5 @@ if((GCC_VERSION VERSION_EQUAL "9.0" OR GCC_VERSION VERSION_GREATER "9.0") AND GC
     This text being in a compile log in an open issue may cause it to be closed.")
 endif()
 
-add_subdirectory(3rdparty/libchdr EXCLUDE_FROM_ALL)
-include_directories(3rdparty/libchdr/include)
-add_subdirectory(3rdparty/yaml-cpp EXCLUDE_FROM_ALL)
-include_directories(3rdparty/yaml-cpp/include)
+check_lib(LIBCHDR libchdr)
+find_package(yaml-cpp)
diff --git a/common/src/Utilities/CMakeLists.txt b/common/src/Utilities/CMakeLists.txt
index 84b8b3cf3..f8398cf2c 100644
--- a/common/src/Utilities/CMakeLists.txt
+++ b/common/src/Utilities/CMakeLists.txt
@@ -72,7 +72,7 @@ set(UtilitiesFinalLibs
     ${LIBC_LIBRARIES} # Gold (new linux linker) does not get automatically dependency of dependency
 	${wxWidgets_LIBRARIES}
 	yaml-cpp
-	chdr-static
+	chdr
 )
 
 if(MSVC)
diff --git a/common/src/x86emitter/CMakeLists.txt b/common/src/x86emitter/CMakeLists.txt
index e8dead638..19b7c3f42 100644
--- a/common/src/x86emitter/CMakeLists.txt
+++ b/common/src/x86emitter/CMakeLists.txt
@@ -58,6 +58,7 @@ set(x86emitterFinalSources
 )
 
 set(x86emitterFinalLibs
+	${wxWidgets_LIBRARIES}
 )
 
 add_pcsx2_lib(${Output} "${x86emitterFinalSources}" "${x86emitterFinalLibs}" "${x86emitterFinalFlags}")