Browse Source

ENH: Update FindPythonQt to expect Python using Find_package(PythonLibs)

Jean-Christophe Fillion-Robin 15 years ago
parent
commit
7288ae2078
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Utilities/CMake/FindPythonQt.cmake

+ 6 - 0
Utilities/CMake/FindPythonQt.cmake

@@ -3,6 +3,12 @@
 # Sets PYTHONQT_FOUND, PYTHONQT_INCLUDE_DIR, PYTHONQT_LIBRARY, PYTHONQT_LIBRARIES
 #
 
+# Python is required
+FIND_PACKAGE(PythonLibs)
+IF(NOT PYTHONLIBS_FOUND)
+  MESSAGE(FATAL_ERROR "error: Python is required to build PythonQt")
+ENDIF()
+
 FIND_PATH(PYTHONQT_INSTALL_DIR include/PythonQt/PythonQt.h DOC "Directory where PythonQt was installed.")
 FIND_PATH(PYTHONQT_INCLUDE_DIR PythonQt.h "${PYTHONQT_INSTALL_DIR}/include/PythonQt" DOC "Path to the PythonQt include directory")
 FIND_LIBRARY(PYTHONQT_LIBRARY PythonQt PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "The PythonQt library.")