RenderKit / embree

Embree ray tracing kernels repository.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to build on windows

loopless opened this issue · comments

Trying to build 'master' on windows. One API 2023 installed

cmake -G "Visual Studio 17 2022" ..
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.34.31937.0
-- The CXX compiler identification is MSVC 19.34.31937.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/bin/git.exe (found version "2.35.1.windows.2")
-- MSVC detected
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found TBB: 2021.5.0 at C:/Program Files (x86)/Intel/oneAPI/tbb/2021.5.0/lib/cmake/tbb via TBBConfig.cmake
-- OpenImageIO not found in your environment. You can 1) install
via your OS package manager, or 2) install it
somewhere on your machine and point OPENIMAGEIO_ROOT to it. (missing: OPENIMAGEIO_INCLUDE_DIR OPENIMAGEIO_LIBRARY)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find PNG (missing: PNG_INCLUDE_DIR PNG_LIBRARIES)
-- glfw3 installation not found. download and build from source
MSBuild version 17.4.1+9a89d02ff for .NET Framework
Checking Build System
Creating directories for 'glfw-populate'
Building Custom Rule D:/VAOne2024/testing/embree/build/_deps/glfw-subbuild/CMakeLists.txt
Performing download step (git clone) for 'glfw-populate'
Cloning into 'glfw-src'...
HEAD is now at 7482de60 Documentation work
Performing update step for 'glfw-populate'
Performing patch step for 'glfw-populate'
HEAD is now at 7482de60 Documentation work
Checking patch src/null_platform.h...
CUSTOMBUILD : error : while searching for: [D:\testing\embree\build_deps\glfw-subbuild\glfw-populate.vcxproj]
#include "null_joystick.h"?
?
#if defined(_GLFW_WIN32)?
#define _glfw_dlopen(name) LoadLibraryA(name)?
#define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle)?
#define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name)?
#else?

CUSTOMBUILD : error : patch failed: src/null_platform.h:43 [D:\testing\embree\build_deps\glfw-subbuild\glfw-populate.vcxproj]

commented

Hi, this error is most likely related to how git checks out line endings on your machine.

Line endings for embree are commited UNIX-style, so you have to make sure you have git configured so that line endings are converted correctly. You can do that with

git config core.autocrlf true

see https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings for more information on line endings in git

Yes, that was the problem. I did have to use --global on the git config