diff --git a/.github/workflows/mingw-w64-msys2.yml b/.github/workflows/mingw-w64-msys2.yml index c667f99f521b..159dfcaa9d37 100644 --- a/.github/workflows/mingw-w64-msys2.yml +++ b/.github/workflows/mingw-w64-msys2.yml @@ -71,7 +71,7 @@ jobs: -DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python \ -DWITH_3D=ON \ -DWITH_DRACO=ON \ - -DWITH_PDAL=OFF \ + -DWITH_PDAL=ON \ -DWITH_CUSTOM_WIDGETS=ON \ -DWITH_BINDINGS=OFF \ -DWITH_GRASS=OFF \ diff --git a/external/pdal_wrench/tile/tile.cpp b/external/pdal_wrench/tile/tile.cpp index cbd85ed9fbd3..e368c136f0a1 100644 --- a/external/pdal_wrench/tile/tile.cpp +++ b/external/pdal_wrench/tile/tile.cpp @@ -51,7 +51,11 @@ std::vector directoryList(const std::string& dir) fs::directory_iterator end; while (it != end) { +#ifndef __MINGW32__ files.push_back(untwine::fromNative(it->path())); +#else + files.push_back(untwine::fromNative(it->path().string())); +#endif it++; } } diff --git a/external/untwine/untwine/Common.cpp b/external/untwine/untwine/Common.cpp index cd56816474f5..21720c39e71c 100644 --- a/external/untwine/untwine/Common.cpp +++ b/external/untwine/untwine/Common.cpp @@ -55,7 +55,11 @@ MapContext mapFile(const std::string& filename, bool readOnly, size_t pos, size_ #ifndef _WIN32 ctx.m_fd = ::open(filename.data(), readOnly ? O_RDONLY : O_RDWR); #else +#ifdef _MSC_VER ctx.m_fd = ::_wopen(toNative(filename).data(), readOnly ? _O_RDONLY : _O_RDWR); +#else + ctx.m_fd = ::_open(toNative(filename).data(), readOnly ? _O_RDONLY : _O_RDWR); +#endif #endif if (ctx.m_fd == -1) @@ -129,7 +133,11 @@ std::vector directoryList(const std::string& dir) fs::directory_iterator end; while (it != end) { +#ifndef __MINGW32__ files.push_back(untwine::fromNative(it->path())); +#else + files.push_back(untwine::fromNative(it->path().string())); +#endif it++; } } diff --git a/external/untwine/untwine/Untwine.cpp b/external/untwine/untwine/Untwine.cpp index 75c39710be90..e2b23193150f 100644 --- a/external/untwine/untwine/Untwine.cpp +++ b/external/untwine/untwine/Untwine.cpp @@ -122,7 +122,7 @@ void cleanup(const std::string& dir, bool rmdir) } // namespace untwine -#ifdef _WIN32 +#ifdef _MSC_VER int wmain( int argc, wchar_t *argv[ ], wchar_t *envp[ ] ) #else int main(int argc, char *argv[])