Introduce a new String class, based on QByteArray, to avoid the overhead
[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
12     QGst/global.cpp
13     QGst/structure.cpp
14     QGst/caps.cpp
15     QGst/miniobject.cpp
16     QGst/object.cpp
17     QGst/pad.cpp
18     QGst/ghostpad.cpp
19     QGst/element.cpp
20     QGst/pluginfeature.cpp
21     QGst/elementfactory.cpp
22     QGst/bin.cpp
23     QGst/childproxy.cpp
24     QGst/pipeline.cpp
25     QGst/message.cpp
26     ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
27 )
28
29 set(INSTALLED_HEADERS
30     QGlib/global.h
31     QGlib/gdeclarations.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/closure.h     QGlib/Closure
39     QGlib/string.h      QGlib/String
40
41     QGlib/valueimpl/assert.h
42     QGlib/valueimpl/valueimpl.h
43     QGlib/valueimpl/nativetypes.h
44     QGlib/valueimpl/paramspecptr.h
45     QGlib/valueimpl/objectptr.h
46
47     QGst/global.h       QGst/Global
48     QGst/enums.h
49     QGst/structure.h    QGst/Structure
50     QGst/caps.h         QGst/Caps
51     QGst/miniobject.h   QGst/MiniObject
52     QGst/object.h       QGst/Object
53     QGst/pad.h          QGst/Pad
54     QGst/ghostpad.h     QGst/GhostPad
55     QGst/element.h      QGst/Element
56     QGst/pluginfeature.h QGst/PluginFeature
57     QGst/elementfactory.h QGst/ElementFactory
58     QGst/bin.h          QGst/Bin
59     QGst/childproxy.h   QGst/ChildProxy
60     QGst/pipeline.h     QGst/Pipeline
61     QGst/message.h      QGst/Message
62 )
63
64 set(CODEGEN_HEADERS
65     QGlib/type.h
66     QGlib/paramspec.h
67     QGlib/object.h
68     QGlib/closure.h
69
70     QGst/enums.h
71     QGst/structure.h
72     QGst/caps.h
73     QGst/miniobject.h
74     QGst/object.h
75     QGst/pad.h
76     QGst/ghostpad.h
77     QGst/element.h
78     QGst/pluginfeature.h
79     QGst/elementfactory.h
80     QGst/bin.h
81     QGst/childproxy.h
82     QGst/pipeline.h
83     QGst/message.h
84 )
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})