Add basic wrapper for GstPipeline (just the method to create a new pipeline for now).
[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
11     QGst/structure.cpp
12     QGst/caps.cpp
13     QGst/miniobject.cpp
14     QGst/object.cpp
15     QGst/pad.cpp
16     QGst/element.cpp
17     QGst/pluginfeature.cpp
18     QGst/elementfactory.cpp
19     QGst/bin.cpp
20     QGst/childproxy.cpp
21     QGst/pipeline.cpp
22     ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
23 )
24
25 set(INSTALLED_HEADERS
26     QGlib/global.h
27     QGlib/gdeclarations.h
28     QGlib/quark.h       QGlib/Quark
29     QGlib/type.h        QGlib/Type
30     QGlib/refpointer.h  QGlib/RefPointer
31     QGlib/paramspec.h   QGlib/ParamSpec
32     QGlib/object.h      QGlib/Object
33     QGlib/value.h       QGlib/Value
34     QGlib/closure.h     QGlib/Closure
35
36     QGlib/valueimpl/assert.h
37     QGlib/valueimpl/valueimpl.h
38     QGlib/valueimpl/nativetypes.h
39     QGlib/valueimpl/paramspecptr.h
40     QGlib/valueimpl/objectptr.h
41
42     QGst/global.h
43     QGst/enums.h
44     QGst/structure.h    QGst/Structure
45     QGst/caps.h         QGst/Caps
46     QGst/miniobject.h   QGst/MiniObject
47     QGst/object.h       QGst/Object
48     QGst/pad.h          QGst/Pad
49     QGst/element.h      QGst/Element
50     QGst/pluginfeature.h QGst/PluginFeature
51     QGst/elementfactory.h QGst/ElementFactory
52     QGst/bin.h          QGst/Bin
53     QGst/childproxy.h   QGst/ChildProxy
54     QGst/pipeline.h     QGst/Pipeline
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/element.h
70     QGst/pluginfeature.h
71     QGst/elementfactory.h
72     QGst/bin.h
73     QGst/childproxy.h
74     QGst/pipeline.h
75 )
76
77 add_custom_command(OUTPUT gen.cpp
78                    COMMAND codegen
79                    ARGS ${CODEGEN_HEADERS} > ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
80                    DEPENDS codegen ${CODEGEN_HEADERS}
81                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
82
83 automoc4_add_library(QtGstreamer SHARED ${QtGstreamer_SRCS})
84 set_target_properties(QtGstreamer PROPERTIES SOVERSION 0 VERSION 0.0.2)
85 target_link_libraries(QtGstreamer ${QT_QTCORE_LIBRARY} ${GSTREAMER_LIBRARIES}
86                                   ${GSTREAMER_INTERFACE_LIBRARY} ${GOBJECT_LIBRARIES})
87 target_link_libraries(QtGstreamer LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY})
88
89
90 install(TARGETS QtGstreamer DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
91
92 foreach(header ${INSTALLED_HEADERS})
93     get_filename_component(header_path ${header} PATH)
94     install(FILES ${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtGstreamer/${header_path})
95 endforeach(header ${INSTALLED_HEADERS})