pbrt-v3 icon indicating copy to clipboard operation
pbrt-v3 copied to clipboard

build error on windows using mingw

Open prashant-saxena opened this issue 2 years ago • 1 comments

Hi,

Windows 10 Cmake 3.22.0 rc 2 g++ (Rev2, Built by MSYS2 project) 10.3.0

$ mingw32-make
[  0%] Building CXX object CMakeFiles/pbrt.dir/src/core/api.cpp.obj
g++.exe: error: /D: No such file or directory
g++.exe: error: PTEX_STATIC: No such file or directory
mingw32-make[2]: *** [CMakeFiles\pbrt.dir\build.make:76: CMakeFiles/pbrt.dir/src/core/api.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:405: CMakeFiles/pbrt.dir/all] Error 2
mingw32-make: *** [Makefile:165: all] Error 2

prashant-saxena avatar Aug 27 '22 05:08 prashant-saxena

I think the issue is that the CMakeLists file assumes that WIN32 implies MSVC, for example here: https://github.com/mmp/pbrt-v3/blob/aaa552a4b9cbf9dccb71450f47b268e0ed6370e2/CMakeLists.txt#L359.

It might suffice to changing that WIN32 check to be for MSVC, but there may be other issues as well. A pull request fixing this would be most welcome!

mmp avatar Sep 18 '22 18:09 mmp