Skip to content

OpenGL target not found when linking to garch #3310

@pablode

Description

@pablode

Description of Issue

When building an application that links to garch or glf, CMake reports:

-- Configuring done
CMake Error at F:/USD-dev/INSTALL/cmake/pxrTargets.cmake:351 (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):
  F:/USD-dev/INSTALL/pxrConfig.cmake:77 (include)
  CMakeLists.txt:29 (find_package)

This was most likely introduced by #2827.

Basically, CMake expects an OpenGL::GL target, but there is no find_package(OpenGL REQUIRED) in pxrConfig.cmake.

Steps to Reproduce

System Information (OS, Hardware)

Windows 10

Package Versions

USD dev (should also affect v24.08)

Build Flags

none

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildBuild-related issue/PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions