Add wrapper for the GstChildProxy interface and use it in Bin.
[qtgstreamer:qtgstreamer.git] / src / CMakeLists.txt
1 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
2
3 set(QtGstreamer_SRCS
4     QGlib/quark.cpp
5     QGlib/type.cpp
6     QGlib/paramspec.cpp
7     QGlib/object.cpp
8     QGlib/value.cpp
9     QGlib/closure.cpp
10
11     QGst/structure.cpp
12     QGst/caps.cpp
13     QGst/miniobject.cpp
14     QGst/object.cpp
15     QGst/pad.cpp
16     QGst/element.cpp
17     QGst/pluginfeature.cpp
18     QGst/elementfactory.cpp
19     QGst/bin.cpp
20     QGst/childproxy.cpp
21     ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
22 )
23
24 set(INSTALLED_HEADERS
25     QGlib/global.h
26     QGlib/gdeclarations.h
27     QGlib/quark.h       QGlib/Quark
28     QGlib/type.h        QGlib/Type
29     QGlib/refpointer.h  QGlib/RefPointer
30     QGlib/paramspec.h   QGlib/ParamSpec
31     QGlib/object.h      QGlib/Object
32     QGlib/value.h       QGlib/Value
33     QGlib/closure.h     QGlib/Closure
34
35     QGlib/valueimpl/assert.h
36     QGlib/valueimpl/valueimpl.h
37     QGlib/valueimpl/nativetypes.h
38     QGlib/valueimpl/paramspecptr.h
39     QGlib/valueimpl/objectptr.h
40
41     QGst/global.h
42     QGst/enums.h
43     QGst/structure.h    QGst/Structure
44     QGst/caps.h         QGst/Caps
45     QGst/miniobject.h   QGst/MiniObject
46     QGst/object.h       QGst/Object
47     QGst/pad.h          QGst/Pad
48     QGst/element.h      QGst/Element
49     QGst/pluginfeature.h QGst/PluginFeature
50     QGst/elementfactory.h QGst/ElementFactory
51     QGst/bin.h          QGst/Bin
52     QGst/childproxy.h   QGst/ChildProxy
53 )
54
55 set(CODEGEN_HEADERS
56     QGlib/type.h
57     QGlib/paramspec.h
58     QGlib/object.h
59     QGlib/closure.h
60
61     QGst/enums.h
62     QGst/structure.h
63     QGst/caps.h
64     QGst/miniobject.h
65     QGst/object.h
66     QGst/pad.h
67     QGst/element.h
68     QGst/pluginfeature.h
69     QGst/elementfactory.h
70     QGst/bin.h
71     QGst/childproxy.h
72 )
73
74 add_custom_command(OUTPUT gen.cpp
75                    COMMAND codegen
76                    ARGS ${CODEGEN_HEADERS} > ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
77                    DEPENDS codegen ${CODEGEN_HEADERS}
78                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
79
80 automoc4_add_library(QtGstreamer SHARED ${QtGstreamer_SRCS})
81 set_target_properties(QtGstreamer PROPERTIES SOVERSION 0 VERSION 0.0.2)
82 target_link_libraries(QtGstreamer ${QT_QTCORE_LIBRARY} ${GSTREAMER_LIBRARIES}
83                                   ${GSTREAMER_INTERFACE_LIBRARY} ${GOBJECT_LIBRARIES})
84 target_link_libraries(QtGstreamer LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY})
85
86
87 install(TARGETS QtGstreamer DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
88
89 foreach(header ${INSTALLED_HEADERS})
90     get_filename_component(header_path ${header} PATH)
91     install(FILES ${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtGstreamer/${header_path})
92 endforeach(header ${INSTALLED_HEADERS})