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