Add initial wrappers for GstPad and GstElement. Not all methods are yet there.
[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     ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
18 )
19
20 set(INSTALLED_HEADERS
21     QGlib/global.h
22     QGlib/gdeclarations.h
23     QGlib/quark.h       QGlib/Quark
24     QGlib/type.h        QGlib/Type
25     QGlib/refpointer.h  QGlib/RefPointer
26     QGlib/paramspec.h   QGlib/ParamSpec
27     QGlib/object.h      QGlib/Object
28     QGlib/value.h       QGlib/Value
29     QGlib/closure.h     QGlib/Closure
30
31     QGlib/valueimpl/assert.h
32     QGlib/valueimpl/valueimpl.h
33     QGlib/valueimpl/nativetypes.h
34     QGlib/valueimpl/paramspecptr.h
35     QGlib/valueimpl/objectptr.h
36
37     QGst/global.h
38     QGst/enums.h
39     QGst/structure.h    QGst/Structure
40     QGst/caps.h         QGst/Caps
41     QGst/miniobject.h   QGst/MiniObject
42     QGst/object.h       QGst/Object
43     QGst/pad.h          QGst/Pad
44     QGst/element.h      QGst/Element
45 )
46
47 set(CODEGEN_HEADERS
48     QGlib/type.h
49     QGlib/paramspec.h
50     QGlib/object.h
51     QGlib/closure.h
52
53     QGst/enums.h
54     QGst/structure.h
55     QGst/caps.h
56     QGst/miniobject.h
57     QGst/object.h
58     QGst/pad.h
59     QGst/element.h
60 )
61
62 add_custom_command(OUTPUT gen.cpp
63                    COMMAND codegen
64                    ARGS ${CODEGEN_HEADERS} > ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
65                    DEPENDS codegen ${CODEGEN_HEADERS}
66                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
67
68 automoc4_add_library(QtGstreamer SHARED ${QtGstreamer_SRCS})
69 set_target_properties(QtGstreamer PROPERTIES SOVERSION 0 VERSION 0.0.2)
70 target_link_libraries(QtGstreamer ${QT_QTCORE_LIBRARY} ${GSTREAMER_LIBRARIES}
71                                   ${GSTREAMER_INTERFACE_LIBRARY} ${GOBJECT_LIBRARIES})
72 target_link_libraries(QtGstreamer LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY})
73
74
75 install(TARGETS QtGstreamer DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
76
77 foreach(header ${INSTALLED_HEADERS})
78     get_filename_component(header_path ${header} PATH)
79     install(FILES ${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtGstreamer/${header_path})
80 endforeach(header ${INSTALLED_HEADERS})