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