diff --git a/CMakeModules/FindPythonQt.cmake b/CMakeModules/FindPythonQt.cmake index 73e33868e..e98124f01 100644 --- a/CMakeModules/FindPythonQt.cmake +++ b/CMakeModules/FindPythonQt.cmake @@ -89,22 +89,19 @@ set(PythonQt_FOUND 0) if(PYTHONQT_LIBRARY AND PYTHONQT_QTALL_LIBRARY) set(PYTHONQT_LIB) -endif() - -if(PYTHONQT_LIBRARY_V32 AND PYTHONQT_QTALL_LIBRARY_V32) - set(PYTHONQT_LIB) +elseif(PYTHONQT_LIBRARY_V32 AND PYTHONQT_QTALL_LIBRARY_V32) set(PYTHONQT_LIB_V32) endif() -if(PYTHONQT_INCLUDE_DIR AND PYTHONQT_LIB) +if(PYTHONQT_INCLUDE_DIR AND (PYTHONQT_LIB OR PYTHONQT_LIB_V32)) # Currently CMake'ified PythonQt only supports building against a python Release build. # This applies independently of CTK build type (Release, Debug, ...) add_definitions(-DPYTHONQT_USE_RELEASE_PYTHON_FALLBACK) set(PYTHONQT_FOUND 1) set(PythonQt_FOUND ${PYTHONQT_FOUND}) - if(PYTHONQT_LIB_V32) - set(PYTHONQT_LIBRARIES ${PYTHONQT_LIBRARY_V32} ${PYTHONQT_LIBUTIL} ${PYTHONQT_QTALL_LIBRARY_V32}) - else + if(PYTHONQT_LIB) set(PYTHONQT_LIBRARIES ${PYTHONQT_LIBRARY} ${PYTHONQT_LIBUTIL} ${PYTHONQT_QTALL_LIBRARY}) + elseif(PYTHONQT_LIB_V32) + set(PYTHONQT_LIBRARIES ${PYTHONQT_LIBRARY_V32} ${PYTHONQT_LIBUTIL} ${PYTHONQT_QTALL_LIBRARY_V32}) endif() endif()