VicentChen / mitsuba

Mitsuba renderer(modified for CMake compilation).
GNU General Public License v3.0
19 stars 8 forks source link

cmake issue #1

Open wl0521 opened 2 years ago

wl0521 commented 2 years ago

I download OpenEXR by below command( git clone --recurse-submodules https://github.com/AcademySoftwareFoundation/openexr.git)

when i cmake, the error message as below:

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043. Found python version: python39 CMake Error at CMakeLists.txt:52 (find_package): By not providing "FindOpenEXR.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OpenEXR", but CMake did not find one.

Could not find a package configuration file provided by "OpenEXR" with any of the following names:

OpenEXRConfig.cmake
openexr-config.cmake

Add the installation prefix of "OpenEXR" to CMAKE_PREFIX_PATH or set "OpenEXR_DIR" to a directory containing one of the above files. If "OpenEXR" provides a separate development package or SDK, be sure it has been installed.

I thought the reason which is I downloading the latest OpenEXR, and the new version don't have this specific file. However, when i search the older version, such as RB-2.3, RB-2.4, they also don't have those files.

SO, how to solve the problem?

VicentChen commented 2 years ago

According to the error message you provided I think you successfully compiled the OpenEXR, but failed to find the dependency.

There are 2 possible solutions:

  1. Check whether you downloaded the OpenEXR repo in dependencies/Downloads. If not, you can copy it to that path, and then cmake the dependencies folder.
  2. Set OpenEXR_ROOT in CMakeLists.txt, Line 51 (https://github.com/VicentChen/mitsuba/blob/cmake/CMakeLists.txt#L51) to your OpenEXR installation path.