Open rishflab opened 1 day ago
The pxrTargets.cmake defines OpenGL as a dependency when GL support is disabled when running the build script.
//pxrTargets.cmake # Create imported target garch add_library(garch SHARED IMPORTED) set_target_properties(garch PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" INTERFACE_LINK_LIBRARIES "arch;tf;-framework Foundation;-framework AppKit;OpenGL::GL" ) Removing OpenGL::GL fixes the error
CMake Error at /$HOME/OpenUSDInstall/cmake/pxrTargets.cmake:329 (set_target_properties): The link interface of target "garch" contains:
OpenGL::GL
but the target was not found. Possible reasons include:
* There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing.
Call Stack (most recent call first): /Users/rishflab/OpenUSDInstall/pxrConfig.cmake:77 (include) CMakeLists.txt:8 (find_package)
python OpenUSD/build_scripts/build_usd.py OpenUSDInstall --build-args USD,"DPXR_ENABLE_GL_SUPPORT=FALSE" --no-python
2. create a project with OpenUSD as a dependency
find_package(pxr REQUIRED PATHS $HOME/OpenUSDInstall)
target_link_libraries(view METAL_CPP ${PXR_LIBRARIES})
target_include_directories(view PRIVATE ${PXR_INCLUDE_DIRS})
3. build the project
cmake -D CMAKE_BUILD_TYPE=Debug -S . -B build cmake --build build --target view
### System Information (OS, Hardware) Mac OS, M3 Max ### Package Versions OpenUSD 24.11 ### Build Flags
Filed as internal issue #USD-10459
Description of Issue
The pxrTargets.cmake defines OpenGL as a dependency when GL support is disabled when running the build script.
CMake Error at /$HOME/OpenUSDInstall/cmake/pxrTargets.cmake:329 (set_target_properties): The link interface of target "garch" contains:
but the target was not found. Possible reasons include:
Call Stack (most recent call first): /Users/rishflab/OpenUSDInstall/pxrConfig.cmake:77 (include) CMakeLists.txt:8 (find_package)
Steps to Reproduce
find_package(pxr REQUIRED PATHS $HOME/OpenUSDInstall)
target_link_libraries(view METAL_CPP ${PXR_LIBRARIES})
target_include_directories(view PRIVATE ${PXR_INCLUDE_DIRS})
cmake -D CMAKE_BUILD_TYPE=Debug -S . -B build cmake --build build --target view
python OpenUSD/build_scripts/build_usd.py OpenUSDInstall --build-args USD,"DPXR_ENABLE_GL_SUPPORT=FALSE" --no-python