forked from PixarAnimationStudios/OpenUSD
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
115 lines (102 loc) · 2.38 KB
/
CMakeLists.txt
File metadata and controls
115 lines (102 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
set(PXR_PREFIX pxr/imaging)
set(PXR_PACKAGE hgiGL)
if (NOT ${PXR_ENABLE_GL_SUPPORT} AND NOT PXR_APPLE_EMBEDDED)
message(STATUS
"Skipping ${PXR_PACKAGE} because PXR_ENABLE_GL_SUPPORT is OFF")
return()
endif()
pxr_library(hgiGL
LIBRARIES
arch
garch
hgi
tf
trace
PRIVATE_CLASSES
conversions
diagnostic
scopedStateHolder
shaderGenerator
shaderSection
PUBLIC_CLASSES
blitCmds
buffer
capabilities
computeCmds
computePipeline
contextArena
debugCodes
device
garbageCollector
graphicsCmds
graphicsPipeline
hgi
ops
resourceBindings
sampler
shaderFunction
shaderProgram
texture
PUBLIC_HEADERS
api.h
RESOURCE_FILES
plugInfo.json
)
if (${PXR_HEADLESS_TEST_MODE})
message(STATUS "Skipping ${PXR_PACKAGE} tests because PXR_HEADLESS_TEST_MODE is ON")
return()
endif()
if (APPLE)
message(STATUS "Skipping ${PXR_PACKAGE} tests because they are currently unsupported on macOS")
return()
endif()
if (WIN32)
message(STATUS "Skipping ${PXR_PACKAGE} tests because they are currently unsupported on Windows")
return()
endif()
pxr_build_test(testHgiGL
LIBRARIES
hgiGL
hgi
hio
tf
gf
garch
CPPFILES
testenv/testHgiGL.cpp
)
pxr_install_test_dir(
SRC testenv/testHgiGL
DEST testHgiGL
)
pxr_register_test(testHgiGL
COMMAND "${CMAKE_INSTALL_PREFIX}/tests/testHgiGL"
DIFF_COMPARE
graphicsCmdsDescCache.txt
IMAGE_DIFF_COMPARE
graphicsCmdsClear.png
srgba.png
copyTextureToBuffer.png
copyBufferToTexture.png
FAIL 1
FAIL_PERCENT 0.001
PERCEPTUAL
EXPECTED_RETURN_CODE 0
)
# This test is not currently supported on static builds as it relies on
# testHgiCommand, which is not linked in the static hgiGL library.
if (BUILD_SHARED_LIBS)
pxr_install_test_dir(
SRC testenv/testHgiGLCommand
DEST testHgiGLCommand
)
pxr_register_test(testHgiGLCommand
COMMAND "${CMAKE_INSTALL_PREFIX}/tests/testHgiCommand --write testHgiGLCommand_triangle.png"
IMAGE_DIFF_COMPARE
testHgiGLCommand_triangle.png
FAIL 1
FAIL_PERCENT 0.001
PERCEPTUAL
EXPECTED_RETURN_CODE 0
)
endif() # BUILD_SHARED_LIBS