mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
Fix PDAL support on MinGW-w64
https://github.com/hobuinc/untwine/pull/162 https://github.com/PDAL/wrench/pull/35
This commit is contained in:
parent
a6a32bd1fd
commit
ded31e1b73
2
.github/workflows/mingw-w64-msys2.yml
vendored
2
.github/workflows/mingw-w64-msys2.yml
vendored
@ -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 \
|
||||
|
4
external/pdal_wrench/tile/tile.cpp
vendored
4
external/pdal_wrench/tile/tile.cpp
vendored
@ -51,7 +51,11 @@ std::vector<std::string> 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++;
|
||||
}
|
||||
}
|
||||
|
8
external/untwine/untwine/Common.cpp
vendored
8
external/untwine/untwine/Common.cpp
vendored
@ -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<std::string> 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++;
|
||||
}
|
||||
}
|
||||
|
2
external/untwine/untwine/Untwine.cpp
vendored
2
external/untwine/untwine/Untwine.cpp
vendored
@ -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[])
|
||||
|
Loading…
x
Reference in New Issue
Block a user