Add wrappers for the simple gst_parse_* methods.
[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     QGlib/signal.cpp
11     QGlib/error.cpp
12
13     QGst/global.cpp
14     QGst/structs.cpp
15     QGst/structure.cpp
16     QGst/caps.cpp
17     QGst/miniobject.cpp
18     QGst/object.cpp
19     QGst/pad.cpp
20     QGst/ghostpad.cpp
21     QGst/element.cpp
22     QGst/pluginfeature.cpp
23     QGst/elementfactory.cpp
24     QGst/bin.cpp
25     QGst/childproxy.cpp
26     QGst/pipeline.cpp
27     QGst/message.cpp
28     QGst/bus.cpp
29     QGst/parse.cpp
30     ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
31 )
32
33 set(INSTALLED_HEADERS
34     QGlib/global.h
35     QGlib/quark.h       QGlib/Quark
36     QGlib/type.h        QGlib/Type
37     QGlib/refpointer.h  QGlib/RefPointer
38     QGlib/paramspec.h   QGlib/ParamSpec
39     QGlib/object.h      QGlib/Object
40     QGlib/value.h       QGlib/Value
41     QGlib/closure.h     QGlib/Closure
42     QGlib/closureimpl_p.h
43     QGlib/signal.h      QGlib/Signal
44     QGlib/signalimpl_p.h
45     QGlib/error.h       QGlib/Error
46
47     QGst/global.h       QGst/Global
48     QGst/enums.h
49     QGst/structs.h      QGst/Fourcc
50                         QGst/Fraction
51                         QGst/IntRange
52                         QGst/DoubleRange
53                         QGst/FractionRange
54     QGst/structure.h    QGst/Structure
55     QGst/caps.h         QGst/Caps
56     QGst/miniobject.h   QGst/MiniObject
57     QGst/object.h       QGst/Object
58     QGst/pad.h          QGst/Pad
59     QGst/ghostpad.h     QGst/GhostPad
60     QGst/element.h      QGst/Element
61     QGst/pluginfeature.h QGst/PluginFeature
62     QGst/elementfactory.h QGst/ElementFactory
63     QGst/bin.h          QGst/Bin
64     QGst/childproxy.h   QGst/ChildProxy
65     QGst/pipeline.h     QGst/Pipeline
66     QGst/message.h      QGst/Message
67     QGst/bus.h          QGst/Bus
68     QGst/parse.h        QGst/Parse
69 )
70
71 set(CODEGEN_HEADERS
72     QGlib/type.h
73     QGlib/paramspec.h
74     QGlib/object.h
75     QGlib/closure.h
76     QGlib/signal.h
77
78     QGst/enums.h
79     QGst/structs.h
80     QGst/structure.h
81     QGst/caps.h
82     QGst/miniobject.h
83     QGst/object.h
84     QGst/pad.h
85     QGst/ghostpad.h
86     QGst/element.h
87     QGst/pluginfeature.h
88     QGst/elementfactory.h
89     QGst/bin.h
90     QGst/childproxy.h
91     QGst/pipeline.h
92     QGst/message.h
93     QGst/bus.h
94 )
95
96 add_definitions(-DQT_NO_KEYWORDS)
97
98 add_custom_command(OUTPUT gen.cpp
99                    COMMAND codegen
100                    ARGS ${CODEGEN_HEADERS} > ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
101                    DEPENDS codegen ${CODEGEN_HEADERS}
102                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
103
104 automoc4_add_library(QtGstreamer SHARED ${QtGstreamer_SRCS})
105 set_target_properties(QtGstreamer PROPERTIES SOVERSION 0 VERSION 0.0.2)
106 target_link_libraries(QtGstreamer ${QT_QTCORE_LIBRARY} ${GSTREAMER_LIBRARIES}
107                                   ${GSTREAMER_INTERFACE_LIBRARY} ${GOBJECT_LIBRARIES})
108 target_link_libraries(QtGstreamer LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY})
109
110
111 install(TARGETS QtGstreamer DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
112
113 foreach(header ${INSTALLED_HEADERS})
114     get_filename_component(header_path ${header} PATH)
115     install(FILES ${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtGstreamer/${header_path})
116 endforeach(header ${INSTALLED_HEADERS})