From e56f0e75f4b9702c7672be99703392acdceb6e5c Mon Sep 17 00:00:00 2001 From: Martin Rodriguez Reboredo Date: Wed, 18 Sep 2024 16:31:56 -0300 Subject: [PATCH] Appropiate include dirs for selected Qt version --- interfaces/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index 92f9af6..46bbe59 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -66,11 +66,16 @@ if (SoQt_FOUND) target_link_libraries(soqt PUBLIC ${Python_LIBRARIES}) endif () + if (PIVY_USE_QT6) + set(QT_INC_DIRS ${Qt6Gui_INCLUDE_DIRS} ${Qt6Widgets_INCLUDE_DIRS}) + else () + set(QT_INC_DIRS ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS}) + endif () + target_include_directories(soqt PUBLIC ${SoQt_INCLUDE_DIRS} - ${Qt5Gui_INCLUDE_DIRS} - ${Qt5Widgets_INCLUDE_DIRS} + ${QT_INC_DIRS} ${Python_INCLUDE_DIRS} PRIVATE ${CMAKE_SOURCE_DIR}/interfaces