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