/usr/share/tulip/FindQtX.cmake is in libtulip-dev 4.8.0dfsg-2build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | SET(USE_QT5_IF_INSTALLED OFF CACHE BOOL "Use Qt5 to build the project if it is installed.")
SET(Qt5Widgets_FOUND false)
SET(Qt5OpenGL_FOUND false)
SET(Qt5Xml_FOUND false)
SET(Qt5XmlPatterns_FOUND false)
SET(Qt5Network_FOUND false)
SET(Qt5WebKit_FOUND false)
SET(Qt5WebKitWidgets_FOUND false)
# If requested, use Qt5 to build the project
# In order for CMake to find and configure a Qt5 build, the root directory
# of the Qt5 installation must be provided in the CMAKE_PREFIX_PATH variable
# Also, when building Tulip Python wheels, force the use of Qt4 (more lightweight, easier to deploy)
IF(USE_QT5_IF_INSTALLED AND NOT ACTIVATE_PYTHON_WHEELS_TARGETS)
# Unset related CMake variables in order to change the Qt5 version (by modifying the root Qt5 directory through the CMAKE_PREFIX_PATH variable)
# without having to delete the current CMake cache
UNSET(Qt5Core_FOUND CACHE)
UNSET(Qt5Gui_FOUND CACHE)
UNSET(Qt5Widgets_FOUND CACHE)
UNSET(Qt5OpenGL_FOUND CACHE)
UNSET(Qt5Xml_FOUND CACHE)
UNSET(Qt5XmlPatterns_FOUND CACHE)
UNSET(Qt5Network_FOUND CACHE)
UNSET(Qt5WebKit_FOUND CACHE)
UNSET(Qt5WebKitWidgets_FOUND CACHE)
UNSET(Qt5Multimedia_FOUND CACHE)
UNSET(Qt5MultimediaWidgets_FOUND CACHE)
UNSET(Qt5Positioning_FOUND CACHE)
UNSET(Qt5PrintSupport_FOUND CACHE)
UNSET(Qt5Qml_FOUND CACHE)
UNSET(Qt5Quick_FOUND CACHE)
UNSET(Qt5Sensors_FOUND CACHE)
UNSET(Qt5DBus_FOUND CACHE)
UNSET(Qt5Core_DIR CACHE)
UNSET(Qt5Gui_DIR CACHE)
UNSET(Qt5Widgets_DIR CACHE)
UNSET(Qt5OpenGL_DIR CACHE)
UNSET(Qt5Xml_DIR CACHE)
UNSET(Qt5XmlPatterns_DIR CACHE)
UNSET(Qt5Network_DIR CACHE)
UNSET(Qt5WebKit_DIR CACHE)
UNSET(Qt5WebKitWidgets_DIR CACHE)
UNSET(Qt5Multimedia_DIR CACHE)
UNSET(Qt5MultimediaWidgets_DIR CACHE)
UNSET(Qt5Positioning_DIR CACHE)
UNSET(Qt5PrintSupport_DIR CACHE)
UNSET(Qt5Qml_DIR CACHE)
UNSET(Qt5Quick_DIR CACHE)
UNSET(Qt5Sensors_DIR CACHE)
UNSET(Qt5DBus_DIR CACHE)
FIND_PACKAGE(Qt5Widgets)
FIND_PACKAGE(Qt5OpenGL)
FIND_PACKAGE(Qt5Xml)
FIND_PACKAGE(Qt5XmlPatterns)
FIND_PACKAGE(Qt5Network)
FIND_PACKAGE(Qt5WebKit)
FIND_PACKAGE(Qt5WebKitWidgets)
IF(APPLE)
FIND_PACKAGE(Qt5DBus)
FIND_PACKAGE(Qt5PrintSupport)
ENDIF(APPLE)
ENDIF(USE_QT5_IF_INSTALLED AND NOT ACTIVATE_PYTHON_WHEELS_TARGETS)
# Qt5 and all the required modules are present, do global setup
IF(${Qt5Widgets_FOUND} AND ${Qt5OpenGL_FOUND} AND
${Qt5Xml_FOUND} AND ${Qt5XmlPatterns_FOUND} AND ${Qt5Network_FOUND} AND
${Qt5WebKit_FOUND} AND ${Qt5WebKitWidgets_FOUND})
SET(USE_QT5 true)
SET(QT_VERSION ${Qt5Widgets_VERSION_STRING})
STRING(REGEX MATCH "[0-9]\\.[0-9]" QT_VERSION "${QT_VERSION}")
IF(WIN32)
GET_TARGET_PROPERTY(QtCore_location Qt5::Core LOCATION)
GET_FILENAME_COMPONENT(QT_BINARY_DIR ${QtCore_location} PATH)
SET(QT_BINARY_DIR ${QT_BINARY_DIR}/../bin)
SET(QT_PLUGINS_DIR ${QT_BINARY_DIR}/../plugins)
ELSEIF(APPLE)
GET_TARGET_PROPERTY(QtCore_location Qt5::Core LOCATION)
GET_FILENAME_COMPONENT(QT_FRAMEWORKS_DIR ${QtCore_location} PATH)
SET(QT_FRAMEWORKS_DIR ${QT_FRAMEWORKS_DIR}/..)
SET(QT_BINARY_DIR ${QT_FRAMEWORKS_DIR}/../bin)
ENDIF()
INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5OpenGL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5Xml_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5XmlPatterns_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5Network_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5WebKit_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5WebKitWidgets_INCLUDE_DIRS})
ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS})
ADD_DEFINITIONS(${Qt5OpenGL_DEFINITIONS})
ADD_DEFINITIONS(${Qt5Xml_DEFINITIONS})
ADD_DEFINITIONS(${Qt5XmlPatterns_DEFINITIONS})
ADD_DEFINITIONS(${Qt5Network_DEFINITIONS})
ADD_DEFINITIONS(${Qt5WebKit_DEFINITIONS})
ADD_DEFINITIONS(${Qt5WebKitWidgets_DEFINITIONS})
SET(QT_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5OpenGL_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5XmlPatterns_LIBRARIES}
${Qt5Network_LIBRARIES} ${Qt5WebKit_LIBRARIES} ${Qt5WebKitWidgets_LIBRARIES})
IF(APPLE)
SET(QT_LIBRARIES ${QT_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${Qt5DBus_LIBRARIES})
ENDIF(APPLE)
# define aliases for Qt macros in order to build the project
MACRO(QTX_WRAP_CPP outfiles )
QT5_WRAP_CPP(${outfiles} ${ARGN})
ENDMACRO()
MACRO(QTX_WRAP_UI outfiles )
QT5_WRAP_UI(${outfiles} ${ARGN})
ENDMACRO()
MACRO(QTX_ADD_RESOURCES outfiles )
QT5_ADD_RESOURCES(${outfiles} ${ARGN})
ENDMACRO()
# Use Qt4 otherwise
ELSE(${Qt5Widgets_FOUND} AND ${Qt5OpenGL_FOUND} AND
${Qt5Xml_FOUND} AND ${Qt5XmlPatterns_FOUND} AND ${Qt5Network_FOUND} AND
${Qt5WebKit_FOUND} AND ${Qt5WebKitWidgets_FOUND})
IF(USE_QT5_IF_INSTALLED AND NOT ACTIVATE_PYTHON_WHEELS_TARGETS)
MESSAGE("Qt 5 required components or the CMake modules to locate them have not been found.")
MESSAGE("Falling back to Qt 4.")
ENDIF(USE_QT5_IF_INSTALLED AND NOT ACTIVATE_PYTHON_WHEELS_TARGETS)
FIND_PACKAGE(Qt4 4.7.0 REQUIRED)
SET(USE_QT4 true)
SET(QT_USE_QTOPENGL true)
SET(QT_USE_QTXML true)
SET(QT_USE_QTXMLPATTERNS true)
SET(QT_USE_QTNETWORK true)
SET(QT_USE_QTWEBKIT true)
SET(QT_USE_QTTEST false)
SET(QT_USE_QTDBUS false)
INCLUDE(${QT_USE_FILE})
SET(QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}")
IF(APPLE AND ACTIVATE_PYTHON_WHEELS_TARGETS AND ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR} VERSION_GREATER 4.7)
MESSAGE(SEND_ERROR "When building Tulip python wheels on MacOS, Qt version must be less than 4.8."
"Indeed we need universal binaries (i386;x86_64) to build a binary wheel and Qt 4.7 "
"is the last Qt version to provide bundles with universal binaries.")
ENDIF(APPLE AND ACTIVATE_PYTHON_WHEELS_TARGETS AND ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR} VERSION_GREATER 4.7)
# define aliases for Qt macros
MACRO(QTX_WRAP_CPP outfiles )
QT4_WRAP_CPP(${outfiles} ${ARGN})
ENDMACRO()
MACRO(QTX_WRAP_UI outfiles )
QT4_WRAP_UI(${outfiles} ${ARGN})
ENDMACRO()
MACRO(QTX_ADD_RESOURCES outfiles )
QT4_ADD_RESOURCES(${outfiles} ${ARGN})
ENDMACRO()
ENDIF(${Qt5Widgets_FOUND} AND ${Qt5OpenGL_FOUND} AND
${Qt5Xml_FOUND} AND ${Qt5XmlPatterns_FOUND} AND ${Qt5Network_FOUND} AND
${Qt5WebKit_FOUND} AND ${Qt5WebKitWidgets_FOUND})
|