diff --git a/3rdparty/libchdr/CMakeLists.txt b/3rdparty/libchdr/CMakeLists.txt
new file mode 100644
index 000000000..797f2bb6f
--- /dev/null
+++ b/3rdparty/libchdr/CMakeLists.txt
@@ -0,0 +1,11 @@
+add_library(chdr-static STATIC
+ libchdr/src/libchdr_bitstream.c
+ libchdr/src/libchdr_cdrom.c
+ libchdr/src/libchdr_chd.c
+ libchdr/src/libchdr_flac.c
+ libchdr/src/libchdr_huffman.c
+)
+
+target_include_directories(chdr-static PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/libchdr/include")
+target_link_libraries(chdr-static PRIVATE ZLIB::ZLIB LZMA::LZMA)
+target_compile_options(chdr-static PRIVATE "-w")
diff --git a/3rdparty/libchdr/libchdr.vcxproj b/3rdparty/libchdr/libchdr.vcxproj
index 7b0ea1586..8abfecfce 100644
--- a/3rdparty/libchdr/libchdr.vcxproj
+++ b/3rdparty/libchdr/libchdr.vcxproj
@@ -33,29 +33,25 @@
%(PreprocessorDefinitions);_7ZIP_ST
TurnOffAllWarnings
- $(ProjectDir)/libchdr/include/;$(ProjectDir)/libchdr/src/;$(ProjectDir)/libchdr/deps/lzma-19.00/include;$(ProjectDir)/libchdr/deps/zlib-1.2.11;%(AdditionalIncludeDirectories)
+ $(ProjectDir)libchdr\include;$(ProjectDir)\libchdr\src;$(SolutionDir)3rdparty\lzma\include;$(SolutionDir)3rdparty\zlib;%(AdditionalIncludeDirectories)
stdcpp17
-
-
-
-
-
-
-
-
-
-
-
- false
-
+
+
+
+ {a4323327-3f2b-4271-83d9-7f9a3c66b6b2}
+
+
+ {2f6c0388-20cb-4242-9f6c-a6ebb6a83f47}
+
+
-
+
\ No newline at end of file
diff --git a/PCSX2_suite.sln b/PCSX2_suite.sln
index de738a963..b582d7d5a 100644
--- a/PCSX2_suite.sln
+++ b/PCSX2_suite.sln
@@ -68,6 +68,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "3rdparty\zstd\zstd.
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d12memalloc", "3rdparty\d3d12memalloc\d3d12memalloc.vcxproj", "{D45CEC7A-3171-40DD-975D-E1544CF16139}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lzma", "3rdparty\lzma\lzma.vcxproj", "{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug AVX2|x64 = Debug AVX2|x64
@@ -402,6 +404,18 @@ Global
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Release AVX2|x64.Build.0 = Release|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Release|x64.ActiveCfg = Release|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Release|x64.Build.0 = Release|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Debug AVX2|x64.ActiveCfg = Debug|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Debug AVX2|x64.Build.0 = Debug|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Debug|x64.ActiveCfg = Debug|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Debug|x64.Build.0 = Debug|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Devel AVX2|x64.ActiveCfg = Devel|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Devel AVX2|x64.Build.0 = Devel|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Devel|x64.ActiveCfg = Devel|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Devel|x64.Build.0 = Devel|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Release AVX2|x64.ActiveCfg = Release|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Release AVX2|x64.Build.0 = Release|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Release|x64.ActiveCfg = Release|x64
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -432,6 +446,7 @@ Global
{20B2E9FE-F020-42A0-B324-956F5B06EA68} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{52244028-937A-44E9-A76B-2BEA18FD239A} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{D45CEC7A-3171-40DD-975D-E1544CF16139} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
+ {A4323327-3F2B-4271-83D9-7F9A3C66B6B2} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0BC474EA-3628-45D3-9DBC-E22D0B7E0F77}
diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index fba6a42fc..aa323e25a 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -17,7 +17,6 @@ if (WIN32)
add_subdirectory(3rdparty/wxwidgets3.0 EXCLUDE_FROM_ALL)
add_subdirectory(3rdparty/xz EXCLUDE_FROM_ALL)
add_subdirectory(3rdparty/D3D12MemAlloc EXCLUDE_FROM_ALL)
- add_subdirectory(3rdparty/lzma EXCLUDE_FROM_ALL)
else()
## Use cmake package to find module
if (Linux)
@@ -253,8 +252,8 @@ if(QT_BUILD)
add_subdirectory(3rdparty/sdl2 EXCLUDE_FROM_ALL)
endif()
-add_subdirectory(3rdparty/libchdr/libchdr EXCLUDE_FROM_ALL)
-target_compile_options(chdr-static PRIVATE "-w")
+add_subdirectory(3rdparty/lzma EXCLUDE_FROM_ALL)
+add_subdirectory(3rdparty/libchdr EXCLUDE_FROM_ALL)
if(USE_NATIVE_TOOLS)
add_subdirectory(tools/bin2cpp EXCLUDE_FROM_ALL)