npm install hdr-viewerbash
git clone https://github.com/Microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
`
2. Integrate vcpkg with your system: Run the following command:`bash
.\vcpkg\vcpkg integrate install
`
This makes the installed libraries globally available to your build systems.3. Install dependencies: Use vcpkg to install the necessary packages:
`bash
.\vcpkg\vcpkg install openimageio:x64-windows pybind11:x64-windows opencl:x64-windows
`4. Environment Variable: It is recommended to set an environment variable for VCPKG_ROOT:
`bash
setx VCPKG_ROOT
`5. CMake Configuration: While setting up your project with CMake, add the vcpkg entry to your toolchain settings to make sure CMake uses the vcpkg toolchain:
`bash
cmake -E make_directory ./build
cmake ./cpp -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${env:VCPKG_ROOT}/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build . --config Release
`macOS Setup
OpenCL: macOS comes with OpenCL pre-installed, but it's deprecated and will be phased out for Metal. Currently, we are constrained to use OpenCL 1.2 (as opposed to 3.0 on Windows).
Install dependencies: You can use Homebrew to install the necessary packages:
`bash
brew install openimageio
brew install pybind11
brew install opencl-clhpp-headers
`CMake Configuration for Older macOS Versions: If you're building on an older version of macOS, ensure you set the deployment target for compatibility.
`bash
cmake -E make_directory ./build
cmake ./cpp -B ./build -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
`If you need your application to support older versions of macOS, you can specify the minimum OS version required for your project by adding a flag to your CMake configuration command. For example, to support macOS 11.6 or newer, you would use:
`bash
cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=11.6
`
Python setup
For the Python part, you need to install dependencies via pip:`bash
pip install -r requirements.txt
``