From 9651c588bc82fb796d3c901d8dc2cf991f6aa437 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 3 Sep 2018 05:34:23 -0400 Subject: [PATCH] CMake: Search for PythonQt headers in more places. Suggested by Denis Proskurin. --- CMakeModules/FindPythonQt.cmake | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeModules/FindPythonQt.cmake b/CMakeModules/FindPythonQt.cmake index f0f4b8a73..eb773a3d9 100644 --- a/CMakeModules/FindPythonQt.cmake +++ b/CMakeModules/FindPythonQt.cmake @@ -24,17 +24,24 @@ string(REGEX REPLACE ) if(NOT EXISTS "${PYTHONQT_INSTALL_DIR}") - find_path(PYTHONQT_INSTALL_DIR include/PythonQt/PythonQt.h DOC "Directory where PythonQt was installed.") + find_path(PYTHONQT_INSTALL_DIR + NAMES + include/PythonQt/PythonQt.h + include/PythonQt5/PythonQt.h + DOC "Directory where PythonQt was installed.") endif() + # XXX Since PythonQt 3.0 is not yet cmakeified, depending # on how PythonQt is built, headers will not always be # installed in "include/PythonQt". That is why "src" # is added as an option. See [1] for more details. # [1] https://github.com/commontk/CTK/pull/538#issuecomment-86106367 find_path(PYTHONQT_INCLUDE_DIR PythonQt.h - PATHS "${PYTHONQT_INSTALL_DIR}/include/PythonQt" + PATHS + "${PYTHONQT_INSTALL_DIR}/include/PythonQt" + "${PYTHONQT_INSTALL_DIR}/include/PythonQt5" "${PYTHONQT_INSTALL_DIR}/src" - DOC "Path to the PythonQt include directory") + DOC "Path to the PythonQt include directory") if ( NOT PythonQt_FIND_QUIETLY ) message( STATUS "Searching for PythonQt (PythonLibs ${PYTHONLIBS_MAJMIN}) .." )