Skip to content

Conversation

@JM1
Copy link
Contributor

@JM1 JM1 commented Apr 10, 2019

If Qt5 has been enabled during build, then e.g. target Qt5::Widgets is exported
as a install dependency via ElementalTargets.cmake. Thus ElementalConfig.cmake
must find Qt5 and import these Qt5 targets or else the user will get errors like:

CMake Error at CMakeLists.txt:... (add_executable):
Target "..." links to target "Qt5::Widgets" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?

If Qt5 has been enabled during build, then e.g. target Qt5::Widgets is exported
as a install dependency via ElementalTargets.cmake. Thus ElementalConfig.cmake
must find Qt5 and import these Qt5 targets or else the user will get errors like:

CMake Error at CMakeLists.txt:... (add_executable):
  Target "..." links to target "Qt5::Widgets" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?
@JM1
Copy link
Contributor Author

JM1 commented Apr 10, 2019

CMakeFindDependencyMacro requires CMake 3, thus I've replaced find_dependency with find_package.

JM1 added a commit to JM1/ansible-role-jm1-dev-hpc that referenced this pull request May 10, 2019
Elemental exports targets which link to Qt5 CMake targets but those are
not loaded when including Elemental via CMake, breaking user libraries.
Ref.: elemental/Elemental#275
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant