aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/CMakeLists.txt
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-22 16:44:51 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-22 17:49:10 +0200
commit39236c01ae6c9bc99ee3a02d8294679e12d9b734 (patch)
tree7ae55d4e33d5d34109ca7d014db791e73cddbcb5 /sources/pyside2/PySide2/CMakeLists.txt
parent315a9ce2e7b443fa7485ed8c21189e62fe2e2165 (diff)
move everying into sources/pyside2
in preparation for a subtree merge. this should not be necessary to do in a separate commit, but git is a tad stupid about following history correctly without it.
Diffstat (limited to 'sources/pyside2/PySide2/CMakeLists.txt')
-rw-r--r--sources/pyside2/PySide2/CMakeLists.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt
new file mode 100644
index 000000000..01d9f64c2
--- /dev/null
+++ b/sources/pyside2/PySide2/CMakeLists.txt
@@ -0,0 +1,33 @@
+project(pyside2)
+
+# Configure include based on platform
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h" @ONLY)
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY)
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/_utils.py.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/_utils.py" @ONLY)
+
+# Add the collected includes to the global include
+file(READ "${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h.add" GLOBAL_APPEND)
+file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h" "${GLOBAL_APPEND}")
+file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h.add")
+
+# now compile all modules.
+foreach(shortname IN LISTS all_module_shortnames)
+ set(name "Qt5${shortname}")
+ HAS_QT_MODULE(${name}_FOUND Qt${shortname})
+endforeach()
+
+# install
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py"
+ DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside2_SUFFIX}")
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_utils.py
+ DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside2_SUFFIX}")
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml
+ DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h
+ DESTINATION include/${BINDING_NAME}${pyside2_SUFFIX})
+