Skip to content

Commit ff2ea09

Browse files
theblackunknownpixar-oss
authored andcommitted
Replaces find_package with find_dependency calls in pxrConfig.cmake.in.
Closes #3205 (Internal change: 2358834)
1 parent 3e1ebd8 commit ff2ea09

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pxr/pxrConfig.cmake.in

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ set(PXR_MINOR_VERSION "@PXR_MINOR_VERSION@")
1616
set(PXR_PATCH_VERSION "@PXR_PATCH_VERSION@")
1717
set(PXR_VERSION "@PXR_VERSION@")
1818

19+
include(CMakeFindDependencyMacro)
20+
1921
# If Python support was enabled for this USD build, find the import
2022
# targets by invoking the appropriate FindPython module. Use the same
2123
# LIBRARY and INCLUDE_DIR settings from the original build if they
@@ -41,9 +43,9 @@ if(@PXR_ENABLE_PYTHON_SUPPORT@)
4143
endif()
4244

4345
if (NOT DEFINED Python3_VERSION)
44-
find_package(Python3 "@Python3_VERSION@" EXACT COMPONENTS Development REQUIRED)
46+
find_dependency(Python3 "@Python3_VERSION@" EXACT COMPONENTS Development)
4547
else()
46-
find_package(Python3 COMPONENTS Development REQUIRED)
48+
find_dependency(Python3 COMPONENTS Development)
4749
endif()
4850
endif()
4951

@@ -57,7 +59,7 @@ if(@PXR_ENABLE_MATERIALX_SUPPORT@)
5759
set(MaterialX_DIR [[@MaterialX_DIR@]])
5860
endif()
5961
endif()
60-
find_package(MaterialX REQUIRED)
62+
find_dependency(MaterialX)
6163
endif()
6264

6365
# Similar to MaterialX above, we are using Imath's cmake package config, so set
@@ -71,7 +73,7 @@ if(@Imath_FOUND@)
7173
set(Imath_DIR [[@Imath_DIR@]])
7274
endif()
7375
endif()
74-
find_package(Imath REQUIRED)
76+
find_dependency(Imath)
7577
endif()
7678

7779
include("${PXR_CMAKE_DIR}/cmake/pxrTargets.cmake")

0 commit comments

Comments
 (0)