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