Initial implementation of the GObject signal wrapper system.
[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/structure.cpp
15     QGst/caps.cpp
16     QGst/miniobject.cpp
17     QGst/object.cpp
18     QGst/pad.cpp
19     QGst/ghostpad.cpp
20     QGst/element.cpp
21     QGst/pluginfeature.cpp
22     QGst/elementfactory.cpp
23     QGst/bin.cpp
24     QGst/childproxy.cpp
25     QGst/pipeline.cpp
26     QGst/message.cpp
27     ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
28 )
29
30 set(INSTALLED_HEADERS
31     QGlib/global.h
32     QGlib/quark.h       QGlib/Quark
33     QGlib/type.h        QGlib/Type
34     QGlib/refpointer.h  QGlib/RefPointer
35     QGlib/paramspec.h   QGlib/ParamSpec
36     QGlib/object.h      QGlib/Object
37     QGlib/value.h       QGlib/Value
38     QGlib/string.h      QGlib/String
39     QGlib/closure.h     QGlib/Closure
40     QGlib/closureimpl_p.h
41     QGlib/signal.h      QGlib/Signal
42     QGlib/signalimpl_p.h
43
44     QGst/global.h       QGst/Global
45     QGst/enums.h
46     QGst/structure.h    QGst/Structure
47     QGst/caps.h         QGst/Caps
48     QGst/miniobject.h   QGst/MiniObject
49     QGst/object.h       QGst/Object
50     QGst/pad.h          QGst/Pad
51     QGst/ghostpad.h     QGst/GhostPad
52     QGst/element.h      QGst/Element
53     QGst/pluginfeature.h QGst/PluginFeature
54     QGst/elementfactory.h QGst/ElementFactory
55     QGst/bin.h          QGst/Bin
56     QGst/childproxy.h   QGst/ChildProxy
57     QGst/pipeline.h     QGst/Pipeline
58     QGst/message.h      QGst/Message
59 )
60
61 set(CODEGEN_HEADERS
62     QGlib/type.h
63     QGlib/paramspec.h
64     QGlib/object.h
65     QGlib/closure.h
66     QGlib/signal.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_definitions(-DQT_NO_KEYWORDS)
85
86 add_custom_command(OUTPUT gen.cpp
87                    COMMAND codegen
88                    ARGS ${CODEGEN_HEADERS} > ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
89                    DEPENDS codegen ${CODEGEN_HEADERS}
90                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
91
92 automoc4_add_library(QtGstreamer SHARED ${QtGstreamer_SRCS})
93 set_target_properties(QtGstreamer PROPERTIES SOVERSION 0 VERSION 0.0.2)
94 target_link_libraries(QtGstreamer ${QT_QTCORE_LIBRARY} ${GSTREAMER_LIBRARIES}
95                                   ${GSTREAMER_INTERFACE_LIBRARY} ${GOBJECT_LIBRARIES})
96 target_link_libraries(QtGstreamer LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY})
97
98
99 install(TARGETS QtGstreamer DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
100
101 foreach(header ${INSTALLED_HEADERS})
102     get_filename_component(header_path ${header} PATH)
103     install(FILES ${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtGstreamer/${header_path})
104 endforeach(header ${INSTALLED_HEADERS})