Skip to content
Snippets Groups Projects
Commit 32c15658 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Fix CMakeLists.txt regarding PythonQt.

parent 7fea9bdc
No related branches found
No related tags found
No related merge requests found
......@@ -80,8 +80,19 @@ IF(NOT CLIENT_ONLY)
SET(PKG_CONFIG_EXTRA "qtversion=${Qt5Core_VERSION}")
ENDIF(USE_QT4)
FIND_PACKAGE(PythonQt COMPONENTS QtAll)
SET(GEPETTO_GUI_HAS_PYTHONQT (${PythonQt_FOUND} AND ${PythonQt_QtAll_FOUND}) CACHE BOOL "Use PythonQt dependency")
# If GEPETTO_GUI_HAS_PYTHONQT is set to TRUE, then PythonQt is required.
IF(DEFINED GEPETTO_GUI_HAS_PYTHONQT AND GEPETTO_GUI_HAS_PYTHONQT)
FIND_PACKAGE(PythonQt REQUIRED COMPONENTS QtAll)
ELSE()
FIND_PACKAGE(PythonQt COMPONENTS QtAll)
ENDIF()
# Declare option GEPETTO_GUI_HAS_PYTHONQT
# If GEPETTO_GUI_HAS_PYTHONQT was defined, this does not change its value.
IF (PythonQt_FOUND AND PythonQt_QtAll_FOUND)
SET(GEPETTO_GUI_HAS_PYTHONQT TRUE CACHE BOOL "Use PythonQt dependency")
ELSE()
SET(GEPETTO_GUI_HAS_PYTHONQT FALSE CACHE BOOL "Use PythonQt dependency")
ENDIF()
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment