Open tcanabrava opened 3 years ago
This also affects Qt6
I think conan is not able to generate targets in several namespaces : https://docs.conan.io/en/latest/reference/generators/cmake_find_package.html It may be already reported in conan-io/conan. If not, it's worth reporting.
I forgot to answer to this thread: you can emulate any target with a custom CMake module created at package()
time, and added to build_modules in package_info()
. It's tedious, but it works.
Most recipes using this trick create non namespaced targets, but you can perfectly create custom namespaced targets.
Take a look at openexr
recipe: https://github.com/conan-io/conan-center-index/blob/e1d9d8ec8940d759582f8609f08addec1de7b77d/recipes/openexr/2.x/conanfile.py#L98-L226
Hi there,
I was reviewing old issues and I have come across this one.
The qt/5.15.2
version is no longer supported by Conan Center Index.
I'm closing this issue as this recipe has suffer plenty of modifications since this issue was reported.
If for some reason the problem remains nowadays, do not hesitate to reopen this issue or create a new ticket with updated information, preferably using conan v2
.
Happy coding 🐸
@perseoGI I think it should not be closed, this issue has not been fixed.
Okey thanks for opening an updated issue!
It's not an updated issue but a PR fixing this issue.
My sorry, really early in the morning hehe, thanks for your contribution @SpaceIm
This is important for Qt5 / 6 compatibility.
https://doc-snapshots.qt.io/qt6-dev/cmake-qt5-and-qt6-compatibility.html
CMake Error at cmake/AddDualTargetLibrary.cmake:61 (add_library): Target "tet_exec" links to target "Qt::Gui" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): CMakeLists.txt:5
Steps to reproduce (Include if Applicable)
Create a Qt5 project for cmake. Use the versionless Target:
add_executable(test main.cpp) target_link_libraries(test Qt::Core)