conan-center-index: [package] qt/5.15.2: can't use with conan_basic_setup without TARGETS
Package and Environment Details (include every applicable attribute)
- Package Name/Version: qt/5.15.2
- Operating System+version: ALL
- Conan version: conan 1.38.0
- Python version: Python 3.8.4
Conan profile (output of conan profile show default
or conan profile show <profile>
if custom profile is in use)
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux
os_build=Linux
[options]
vulkan-loader:shared=True
[build_requires]
[env]
Steps to reproduce (Include if Applicable)
put this into test package of qt:
cmake_minimum_required(VERSION 3.1.0)
set(CMAKE_CXX_STANDARD 11)
project(test_package)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON)
qt5_wrap_ui(UI_HEADERS temp.ui )
set(SOURCES test_package.cpp greeter.h example.qrc)
add_executable(${PROJECT_NAME} WIN32 ${SOURCES})
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
Logs (Include/Attach if Applicable)
Click to expand log
...
CMake Error at CMakeLists.txt:12 (qt5_wrap_ui):
Unknown CMake command "qt5_wrap_ui".
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (20 by maintainers)
Yes, thanks a lot!
it works if you add
CMAKE_MODULE_PATH=.
at the beginning of the linecmake -DCMAKE_BUILD_TYPE=Debug .
, there is nothing wrong with the recipe or conan here.