Skip to content

Commit

Permalink
Qt5/test_v1_package: make cmake detect QML-feature
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenRoederer committed Oct 23, 2024
1 parent daf2648 commit 3d79816
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions recipes/qt/5.x.x/test_v1_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ conan_set_libcxx()
conan_output_dirs_setup()

find_package(Qt5 COMPONENTS Core Network Sql Concurrent Xml REQUIRED CONFIG)
find_package(Qt5 OPTIONAL_COMPONENTS Qml)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
Expand All @@ -24,7 +23,7 @@ add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Network Qt5::Sql Qt5::Concurrent Qt5::Xml)

# check if QML modules are build and correctly deployed, if enabled
if (TARGET Qt5::Qml)
if (Qt5_Qml_TARGET_PROPERTIES)
add_executable(CheckQMLModules ../test_package/test_qml_modules.cpp)
set_property(TARGET CheckQMLModules PROPERTY CXX_STANDARD 17)
target_link_libraries(CheckQMLModules Qt5::Core Qt5::Qml)
Expand Down

0 comments on commit 3d79816

Please sign in to comment.