f60cffad38
Adds support for linking with some of the dependencies of a USD build instead of the precompiled libraries from Blender, specifically OpenSubdiv, OpenVDB and TBB. Other dependencies keep using the precompiled libraries from Blender, since they are linked statically anyway so it does't matter as much. Plus they have interdependencies that are difficult to resolve when only using selected libraries from the USD build and can't simply assume that USD was built with all of them. This patch also makes building the Hydra render delegate via the standalone repository work and fixes various small issues I ran into in general on Windows (e.g. the use of both fixed paths and `find_package` did not seem to work correctly). Building both the standalone Cycles application and the Hydra render delegate at the same time is supported now as well (the paths in the USD plugin JSON file are updated accordingly). All that needs to be done now to build is to specify a `PXR_ROOT` or `USD_ROOT` CMake variable pointing to the USD installation, everything else is taken care of automatically (CMake targets are loaded from the `pxrTargets.cmake` of USD and linked into the render delegate and OpenSubdiv, OpenVDB and TBB are replaced with those from USD when they exist). Differential Revision: https://developer.blender.org/D14523
46 lines
925 B
C++
46 lines
925 B
C++
/* SPDX-License-Identifier: Apache-2.0
|
|
* Copyright 2022 NVIDIA Corporation
|
|
* Copyright 2022 Blender Foundation */
|
|
|
|
#pragma once
|
|
|
|
#include <pxr/pxr.h>
|
|
|
|
#define CCL_NS ccl
|
|
#define CCL_NAMESPACE_USING_DIRECTIVE using namespace CCL_NS;
|
|
|
|
#define HD_CYCLES_NS HdCycles
|
|
#define HDCYCLES_NAMESPACE_OPEN_SCOPE \
|
|
namespace HD_CYCLES_NS { \
|
|
CCL_NAMESPACE_USING_DIRECTIVE; \
|
|
PXR_NAMESPACE_USING_DIRECTIVE;
|
|
#define HDCYCLES_NAMESPACE_CLOSE_SCOPE }
|
|
|
|
namespace HD_CYCLES_NS {
|
|
class HdCyclesCamera;
|
|
class HdCyclesDelegate;
|
|
class HdCyclesSession;
|
|
class HdCyclesRenderBuffer;
|
|
} // namespace HD_CYCLES_NS
|
|
|
|
namespace CCL_NS {
|
|
class AttributeSet;
|
|
class BufferParams;
|
|
class Camera;
|
|
class Geometry;
|
|
class Hair;
|
|
class Light;
|
|
class Mesh;
|
|
class Object;
|
|
class ParticleSystem;
|
|
class Pass;
|
|
class PointCloud;
|
|
class Scene;
|
|
class Session;
|
|
class SessionParams;
|
|
class Shader;
|
|
class ShaderGraph;
|
|
class ShaderNode;
|
|
class Volume;
|
|
} // namespace CCL_NS
|