From 4602b30264e684d5fe3ead7b48e28daab2adf047 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 3 Sep 2018 06:26:26 -0400 Subject: [PATCH] [libcalamaresui] Use PYTHONQT_INCLUDE_DIRS - document new variable from the CMake module - use it in libcalamaresui to simplify #include'ing the header for the "all" extension. Suggested by Denis Proskurin. --- CMakeModules/FindPythonQt.cmake | 3 +++ src/libcalamaresui/CMakeLists.txt | 3 ++- src/libcalamaresui/modulesystem/PythonQtViewModule.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeModules/FindPythonQt.cmake b/CMakeModules/FindPythonQt.cmake index d1764a3b9..519e1c93e 100644 --- a/CMakeModules/FindPythonQt.cmake +++ b/CMakeModules/FindPythonQt.cmake @@ -2,6 +2,9 @@ # # Sets PYTHONQT_FOUND, PYTHONQT_INCLUDE_DIR, PYTHONQT_LIBRARY, PYTHONQT_LIBRARIES # +# Also sets PYTHONQT_INCLUDE_DIRS to add whatever directories +# that are needed for extensions. +# # Python is required find_package(PythonLibs) diff --git a/src/libcalamaresui/CMakeLists.txt b/src/libcalamaresui/CMakeLists.txt index efd0ebb29..79598d514 100644 --- a/src/libcalamaresui/CMakeLists.txt +++ b/src/libcalamaresui/CMakeLists.txt @@ -48,7 +48,8 @@ endif() if( WITH_PYTHONQT ) include_directories(${PYTHON_INCLUDE_DIRS}) - include_directories(${PYTHONQT_INCLUDE_DIR}) + # *_DIRS because we also use extensions + include_directories(${PYTHONQT_INCLUDE_DIRS}) list( APPEND calamaresui_SOURCES modulesystem/PythonQtViewModule.cpp diff --git a/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp b/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp index 9d0aa95e2..2af6d81e7 100644 --- a/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp +++ b/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp @@ -31,7 +31,7 @@ #include "JobQueue.h" #include -#include +#include #include #include