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