From 756f7cf6af650c855e27adaf9a51bf7f6445ab7e Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 20 Oct 2024 22:52:41 +0200 Subject: [PATCH] CMake: Fix finding qplatformnativeinterface.h --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39a6998b0..d5ad40e6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,7 +207,10 @@ endif() if(X11_FOUND) - find_path(QPA_QPLATFORMNATIVEINTERFACE_H qpa/qplatformnativeinterface.h PATHS ${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS}) + find_path(QPA_QPLATFORMNATIVEINTERFACE_H qpa/qplatformnativeinterface.h PATHS ${Qt${QT_VERSION_MAJOR}Gui_INCLUDE_DIRS} ${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS}) + if(NOT QPA_QPLATFORMNATIVEINTERFACE_H) + find_path(QPA_QPLATFORMNATIVEINTERFACE_H ${Qt${QT_VERSION_MAJOR}Gui_VERSION}/QtGui/qpa/qplatformnativeinterface.h PATHS ${Qt${QT_VERSION_MAJOR}Gui_INCLUDE_DIRS} ${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS}) + endif() if(QPA_QPLATFORMNATIVEINTERFACE_H) set(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H ON) message(STATUS "Have qpa/qplatformnativeinterface.h header.")