summaryrefslogtreecommitdiffstats
path: root/PySide/QtUiTools/CMakeLists.txt
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-08-19 17:48:08 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-08-19 18:26:13 -0300
commit465649d73e552cfb1e74e343eea3341b2842ccd6 (patch)
treeb9ae43dfb79f359f96e44a5af41741fb11ea8811 /PySide/QtUiTools/CMakeLists.txt
parent23672770ea6fd79c38fed0695fc92ca193f0ece4 (diff)
downloadshiboken-465649d73e552cfb1e74e343eea3341b2842ccd6.tar.gz
shiboken-465649d73e552cfb1e74e343eea3341b2842ccd6.tar.xz
shiboken-465649d73e552cfb1e74e343eea3341b2842ccd6.zip
created macro to compile pyside modules.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'PySide/QtUiTools/CMakeLists.txt')
-rw-r--r--PySide/QtUiTools/CMakeLists.txt60
1 files changed, 26 insertions, 34 deletions
diff --git a/PySide/QtUiTools/CMakeLists.txt b/PySide/QtUiTools/CMakeLists.txt
index 320fc1af..9af11fb9 100644
--- a/PySide/QtUiTools/CMakeLists.txt
+++ b/PySide/QtUiTools/CMakeLists.txt
@@ -5,37 +5,29 @@ set(QtUiTools_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools/quiloader_wrapper.cpp
)
-execute_generator(uitools QtUiTools_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtXml_SOURCE_DIR}:${QtUiTools_SOURCE_DIR}")
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}
- ${QT_QTCORE_INCLUDE_DIR}
- ${QT_QTGUI_INCLUDE_DIR}
- ${QT_QTXML_INCLUDE_DIR}
- ${QT_QTUITOOLS_INCLUDE_DIR}
- ${PYTHON_INCLUDE_PATH}
- ${SHIBOKEN_INCLUDE_DIR}
- ${libpyside_SOURCE_DIR}
- ${QtCore_BINARY_DIR}/PySide/QtCore/
- ${QtXml_BINARY_DIR}/PySide/QtXml/
- ${QtGui_BINARY_DIR}/PySide/QtGui/
- ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools)
-
-add_library(QtUiTools MODULE ${QtUiTools_SRC})
-set_target_properties(QtUiTools PROPERTIES PREFIX "")
-target_link_libraries(QtUiTools
- pyside
- ${PYSIDE_PYTHON_LIBRARIES}
- ${QT_QTCORE_LIBRARY}
- ${QT_QTGUI_LIBRARY}
- ${QT_QTUITOOLS_LIBRARY})
-
-add_dependencies(QtUiTools QtGui QtXml)
-
-# install
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtUiTools${CMAKE_DEBUG_POSTFIX}.so
- DESTINATION ${SITE_PACKAGE}/PySide)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools/pyside_qtuitools_python.h
- DESTINATION include/PySide/QtUiTools/)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_uitools.xml
- DESTINATION share/PySide/typesystems)
-
+set(QtUiTools_typesystem_path "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtXml_SOURCE_DIR}:${QtUiTools_SOURCE_DIR}")
+set(QtUiTools_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
+ ${QT_QTCORE_INCLUDE_DIR}
+ ${QT_QTGUI_INCLUDE_DIR}
+ ${QT_QTXML_INCLUDE_DIR}
+ ${QT_QTUITOOLS_INCLUDE_DIR}
+ ${PYTHON_INCLUDE_PATH}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_BINARY_DIR}/PySide/QtCore/
+ ${QtXml_BINARY_DIR}/PySide/QtXml/
+ ${QtGui_BINARY_DIR}/PySide/QtGui/
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools)
+set(QtUiTools_libraries pyside
+ ${PYSIDE_PYTHON_LIBRARIES}
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTGUI_LIBRARY}
+ ${QT_QTUITOOLS_LIBRARY})
+set(QtUiTools_deps QtGui QtXml)
+create_pyside_module(QtUiTools
+ ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_uitools.xml
+ QtUiTools_include_dirs
+ QtUiTools_libraries
+ QtUiTools_deps
+ QtUiTools_typesystem_path
+ QtUiTools_SRC)