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