Skip to content

CMake config does not reexport Gau2Grid if used as external dependency #168

@awvwgk

Description

@awvwgk

When using an installed GauXC library built against installed Gau2Grid library, the gauxc::gauxc target does not provide gau2grid::gg target.

CMake Error at /home/runner/micromamba/envs/gauxc-dev/lib/cmake/gauxc/gauxc-targets.cmake:61 (set_target_properties):
  The link interface of target "gauxc::gauxc" contains:

    gau2grid::gg

  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.

A possible workaround when using GauXC would be to always find GauXC as

find_package(gauxc CONFIG REQUIRED)
if(GAUXC_HAS_GAU2GRID AND NOT TARGET gau2grid::gg)
  find_package(gau2grid CONFIG REQUIRED)
endif()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions