aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PySide/CMakeLists.txt27
-rw-r--r--PySide/phonon/CMakeLists.txt5
-rw-r--r--PySide/phonon/typesystem_phonon.xml8
3 files changed, 34 insertions, 6 deletions
diff --git a/PySide/CMakeLists.txt b/PySide/CMakeLists.txt
index 8a1f4d25..05191e37 100644
--- a/PySide/CMakeLists.txt
+++ b/PySide/CMakeLists.txt
@@ -47,19 +47,41 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul
install(FILES ${typesystem_files} DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
endmacro()
+#macro(check_qt_class_with_namespace module namespace class global_sources [namespace])
macro(check_qt_class module class global_sources)
+ if (${ARGC} GREATER 3)
+ set (namespace ${ARGV3})
+ string(TOLOWER ${namespace} _namespace)
+ else ()
+ set (namespace "")
+ endif ()
+ if (${ARGC} GREATER 4)
+ set (include_file ${ARGV4})
+ else ()
+ set (include_file ${module})
+ endif ()
string(TOLOWER ${class} _class)
string(TOUPPER ${module} _module)
- set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_class}_wrapper.cpp)
+ if (${namespace})
+ set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_namespace}_${_class}_wrapper.cpp)
+ else ()
+ set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_class}_wrapper.cpp)
+ endif ()
if (DEFINED PYSIDE_${class})
if (PYSIDE_${class})
list(APPEND ${global_sources} ${_cppfile})
endif()
else()
+ if (NOT ${namespace} STREQUAL "" )
+ set (NAMESPACE_USE "using namespace ${namespace};")
+ else ()
+ set (NAMESPACE_USE "")
+ endif ()
set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${class}.cxx)
file(WRITE ${SRC_FILE}
- "#include <${module}>\n"
+ "#include <${include_file}>\n"
"#include <typeinfo>\n"
+ "${NAMESPACE_USE}\n"
"int main() { typeid(${class}); }\n"
)
try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
@@ -85,7 +107,6 @@ endmacro()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/global.h" @ONLY)
-
# Only add subdirectory if the associated Qt module is found.
macro(HAS_QT_MODULE var name)
if (NOT DISABLE_${name} AND ${var})
diff --git a/PySide/phonon/CMakeLists.txt b/PySide/phonon/CMakeLists.txt
index 5961a9e8..198ed6e2 100644
--- a/PySide/phonon/CMakeLists.txt
+++ b/PySide/phonon/CMakeLists.txt
@@ -3,7 +3,7 @@ project(phonon)
# workaround for a cmake bug under MacOSX, it finds phonon but not the include path
if (NOT QT_PHONON_INCLUDE_DIR AND CMAKE_HOST_APPLE)
set(QT_PHONON_INCLUDE_DIR "${QT_LIBRARY_DIR}/phonon.framework/Headers")
-endif()
+endif ()
set(phonon_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractaudiooutput_wrapper.cpp
@@ -43,6 +43,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumeslider_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_backendcapabilities_notifierwrapper_wrapper.cpp
)
+
+check_qt_class("phonon" "VideoCaptureDevice" phonon_SRC "Phonon" "ObjectDescription")
+
set(phonon_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${phonon_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(phonon_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR}
diff --git a/PySide/phonon/typesystem_phonon.xml b/PySide/phonon/typesystem_phonon.xml
index 4c700bc3..ef05c266 100644
--- a/PySide/phonon/typesystem_phonon.xml
+++ b/PySide/phonon/typesystem_phonon.xml
@@ -158,8 +158,12 @@
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
<modify-function signature="fromIndex(int)" remove="all"/>
</value-type>
-
- <value-type name="AudioCaptureDevice">
+ <value-type name="AudioCaptureDevice">
+ <modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/>
+ <modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
+ <modify-function signature="fromIndex(int)" remove="all"/>
+ </value-type>
+ <value-type name="VideoCaptureDevice">
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/>
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
<modify-function signature="fromIndex(int)" remove="all"/>