[CMakeModules] fix if loops

This commit is contained in:
Philip 2017-06-18 21:40:02 +02:00
parent 3afc94d68e
commit 08423f0d5a

View File

@ -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()