summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2021-05-28 09:50:06 +0200
committerDominik Holland <dominik.holland@qt.io>2021-05-28 14:13:10 +0200
commite63abd2a122a21623e0c623b94f4719149c1eca7 (patch)
tree63bf1a92b126e9e4f62cfcc04ab8f3c3237f24f2
parent7d5688011f33a2bb18aa4d8651f336e5c3c8f685 (diff)
downloadqtivi-e63abd2a122a21623e0c623b94f4719149c1eca7.tar.gz
cmake: Fix building the climate_widget example
Change-Id: I3d8093a810ac00338c6db20883f6262461e3de82 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r--CMakeLists.txt2
-rw-r--r--examples/ivivehiclefunctions/climate_widget/CMakeLists.txt8
2 files changed, 3 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9decfec..f484cfc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@ project(QtIvi
set(QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS TRUE)
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core) # special case
-find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Qml Quick RemoteObjects Multimedia Sql DBus) # special case
+find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Qml Quick RemoteObjects Multimedia Sql DBus Widgets) # special case
include(src/ivicore/Qt6IviCoreMacros.cmake)
diff --git a/examples/ivivehiclefunctions/climate_widget/CMakeLists.txt b/examples/ivivehiclefunctions/climate_widget/CMakeLists.txt
index 0e1e124..472237a 100644
--- a/examples/ivivehiclefunctions/climate_widget/CMakeLists.txt
+++ b/examples/ivivehiclefunctions/climate_widget/CMakeLists.txt
@@ -17,6 +17,7 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/ivivehiclefunctions/climate_widge
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS IviCore)
find_package(Qt6 COMPONENTS IviVehicleFunctions)
@@ -31,16 +32,11 @@ set_target_properties(climate_widget PROPERTIES
target_link_libraries(climate_widget PUBLIC
Qt::Core
Qt::Gui
+ Qt::Widgets
Qt::IviCore
Qt::IviVehicleFunctions
)
-if((QT_MAJOR_VERSION GREATER 4))
- target_link_libraries(climate_widget PUBLIC
- Qt::Widgets
- )
-endif()
-
install(TARGETS climate_widget
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"