aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/CMakeLists.txt
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-09-21 14:51:26 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-09-21 14:52:09 -0300
commit9af36fbb64f19842c0cc797c0b586b3a686805e8 (patch)
tree6bbc050ded0f85517ea75f5dc6dc1ed172168248 /PySide/CMakeLists.txt
parentaa12538d63685ef8f75adaa79411b751929b727d (diff)
Added all original pyside unit tests to the shiboken version.
Diffstat (limited to 'PySide/CMakeLists.txt')
-rw-r--r--PySide/CMakeLists.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/PySide/CMakeLists.txt b/PySide/CMakeLists.txt
index aa4b114d6..75ca0fac0 100644
--- a/PySide/CMakeLists.txt
+++ b/PySide/CMakeLists.txt
@@ -12,4 +12,18 @@ COMMENT "Running generator for ${module}..."
)
endmacro(execute_generator)
-add_subdirectory(QtCore)
+# Only add subdirectory if the associated Qt module is found.
+macro(HAS_QT_MODULE var name)
+IF (${var})
+ add_subdirectory(${name})
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/${name}/${name}.so"
+ "${CMAKE_BINARY_DIR}/PySide/${name}.so")
+else (${var})
+ message(STATUS "${name} NOT found. ${name} support disabled.")
+endif (${var})
+endmacro(HAS_QT_MODULE)
+
+execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py"
+ "${CMAKE_BINARY_DIR}/PySide/__init__.py")
+
+HAS_QT_MODULE(QT_QTCORE_FOUND QtCore)