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

Remove unused PythonQt and QGv dependencies.

parent 38eae83c
No related branches found
No related tags found
No related merge requests found
......@@ -89,26 +89,6 @@ IF(NOT CLIENT_ONLY)
INCLUDE_DIRECTORIES(SYSTEM ${EIGEN3_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})
# }}}
# {{{ PythonQt settings
SET(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake-modules/
${CMAKE_MODULE_PATH})
# 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()
ADD_OPTIONAL_DEPENDENCY("qgv")
# }}}
# {{{ Packaging
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
......
# Find PythonQt
#
# Sets PYTHONQT_FOUND, PYTHONQT_INCLUDE_DIR, PYTHONQT_LIBRARY, PYTHONQT_QTALL_LIBRARY, PYTHONQT_LIBRARIES
#
IF(NOT EXISTS "${PYTHONQT_INSTALL_DIR}")
FIND_PATH(PYTHONQT_INSTALL_DIR include/PythonQt/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"
DOC "Path to the PythonQt include directory")
SET(PYTHONQT_LIBRARIES)
MACRO(_SEARCH_FOR COMPONENT)
STRING(TOUPPER ${COMPONENT} _COMP_UPPERCASE)
FIND_LIBRARY(${_COMP_UPPERCASE}_LIBRARY
NAMES ${COMPONENT}
PATHS "${PYTHONQT_INSTALL_DIR}/lib"
DOC "The ${COMPONENT} library.")
IF(NOT ${${_COMP_UPPERCASE}_LIBRARY} STREQUAL "${_COMP_UPPERCASE}_LIBRARY-NOTFOUND")
SET(${COMPONENT}_FOUND TRUE)
SET(PYTHONQT_LIBRARIES ${PYTHONQT_LIBRARIES} ${${_COMP_UPPERCASE}_LIBRARY})
ENDIF(NOT ${${_COMP_UPPERCASE}_LIBRARY} STREQUAL "${_COMP_UPPERCASE}_LIBRARY-NOTFOUND")
MARK_AS_ADVANCED(${_COMP_UPPERCASE}_LIBRARY)
ENDMACRO(_SEARCH_FOR COMP)
_SEARCH_FOR(PythonQt)
FOREACH(_COMPONENT_SHORT ${PythonQt_FIND_COMPONENTS})
SET(_COMPONENT "PythonQt_${_COMPONENT_SHORT}")
_SEARCH_FOR(${_COMPONENT})
ENDFOREACH(_COMPONENT_SHORT ${PythonQt_FIND_COMPONENTS})
MARK_AS_ADVANCED(PYTHONQT_INSTALL_DIR)
MARK_AS_ADVANCED(PYTHONQT_INCLUDE_DIR)
MARK_AS_ADVANCED(PYTHONQT_LIBRARIES)
# All upper case _FOUND variable is maintained for backwards compatibility.
SET(PythonQt_FOUND 0)
IF(PYTHONQT_INCLUDE_DIR AND PYTHONQT_LIBRARIES)
# Currently CMake'ified PythonQt only supports building against a python Release build.
ADD_DEFINITIONS(-DPYTHONQT_USE_RELEASE_PYTHON_FALLBACK)
SET(PythonQt_FOUND 1)
ENDIF()
SET(PYTHONQT_FOUND ${PythonQt_FOUND})
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonQt
REQUIRED_VARS PYTHONQT_LIBRARY PYTHONQT_INCLUDE_DIR
HANDLE_COMPONENTS)
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