Remove QGlib::String again. It sucks.
[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
12     QGst/global.cpp
13     QGst/structs.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     QGst/bus.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/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/structs.h      QGst/Fourcc
47                         QGst/Fraction
48                         QGst/IntRange
49                         QGst/DoubleRange
50                         QGst/FractionRange
51     QGst/structure.h    QGst/Structure
52     QGst/caps.h         QGst/Caps
53     QGst/miniobject.h   QGst/MiniObject
54     QGst/object.h       QGst/Object
55     QGst/pad.h          QGst/Pad
56     QGst/ghostpad.h     QGst/GhostPad
57     QGst/element.h      QGst/Element
58     QGst/pluginfeature.h QGst/PluginFeature
59     QGst/elementfactory.h QGst/ElementFactory
60     QGst/bin.h          QGst/Bin
61     QGst/childproxy.h   QGst/ChildProxy
62     QGst/pipeline.h     QGst/Pipeline
63     QGst/message.h      QGst/Message
64     QGst/bus.h          QGst/Bus
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     QGst/bus.h
90 )
91
92 add_definitions(-DQT_NO_KEYWORDS)
93
94 add_custom_command(OUTPUT gen.cpp
95                    COMMAND codegen
96                    ARGS ${CODEGEN_HEADERS} > ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
97                    DEPENDS codegen ${CODEGEN_HEADERS}
98                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
99
100 automoc4_add_library(QtGstreamer SHARED ${QtGstreamer_SRCS})
101 set_target_properties(QtGstreamer PROPERTIES SOVERSION 0 VERSION 0.0.2)
102 target_link_libraries(QtGstreamer ${QT_QTCORE_LIBRARY} ${GSTREAMER_LIBRARIES}
103                                   ${GSTREAMER_INTERFACE_LIBRARY} ${GOBJECT_LIBRARIES})
104 target_link_libraries(QtGstreamer LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY})
105
106
107 install(TARGETS QtGstreamer DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
108
109 foreach(header ${INSTALLED_HEADERS})
110     get_filename_component(header_path ${header} PATH)
111     install(FILES ${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtGstreamer/${header_path})
112 endforeach(header ${INSTALLED_HEADERS})