From d9486493ded25426042a5f6327c097a6cad756b4 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 11 Sep 2022 18:16:34 +0200 Subject: Fixed WIN32 build of dat There might be small differences between option handling and fnmatch vs. PathMatchSpecA, but that's understandable. --- ArchiveEx/CMakeLists.txt | 6 ++++++ ArchiveEx/dat.cpp | 14 +++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ArchiveEx/CMakeLists.txt b/ArchiveEx/CMakeLists.txt index 62e414e..158e2b3 100644 --- a/ArchiveEx/CMakeLists.txt +++ b/ArchiveEx/CMakeLists.txt @@ -19,3 +19,9 @@ target_link_libraries( dat PRIVATE ArchiveEx ) +if(WIN32) + target_link_libraries( + dat + PRIVATE -l:libshlwapi.a + ) +endif() diff --git a/ArchiveEx/dat.cpp b/ArchiveEx/dat.cpp index 9662cbc..6df04bc 100644 --- a/ArchiveEx/dat.cpp +++ b/ArchiveEx/dat.cpp @@ -1,4 +1,9 @@ +#ifdef WIN32 +#include +#else #include +#endif + #include #include @@ -174,8 +179,11 @@ FilterFile(const std::vector& patterns, std::function