Add wrapper class for GstStructure.
[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/object.cpp
13     ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
14 )
15
16 set(INSTALLED_HEADERS
17     QGlib/global.h
18     QGlib/gdeclarations.h
19     QGlib/quark.h       QGlib/Quark
20     QGlib/type.h        QGlib/Type
21     QGlib/refpointer.h  QGlib/RefPointer
22     QGlib/paramspec.h   QGlib/ParamSpec
23     QGlib/object.h      QGlib/Object
24     QGlib/value.h       QGlib/Value
25     QGlib/closure.h     QGlib/Closure
26
27     QGlib/valueimpl/assert.h
28     QGlib/valueimpl/valueimpl.h
29     QGlib/valueimpl/nativetypes.h
30     QGlib/valueimpl/paramspecptr.h
31     QGlib/valueimpl/objectptr.h
32
33     QGst/global.h
34     QGst/structure.h    QGst/Structure
35     QGst/object.h       QGst/Object
36 )
37
38 set(CODEGEN_HEADERS
39     QGlib/type.h
40     QGlib/paramspec.h
41     QGlib/object.h
42     QGlib/closure.h
43     QGst/structure.h
44     QGst/object.h
45 )
46
47 add_custom_command(OUTPUT gen.cpp
48                    COMMAND codegen
49                    ARGS ${CODEGEN_HEADERS} > ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
50                    DEPENDS codegen ${CODEGEN_HEADERS}
51                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
52
53 automoc4_add_library(QtGstreamer SHARED ${QtGstreamer_SRCS})
54 set_target_properties(QtGstreamer PROPERTIES SOVERSION 0 VERSION 0.0.2)
55 target_link_libraries(QtGstreamer ${QT_QTCORE_LIBRARY} ${GSTREAMER_LIBRARIES}
56                                   ${GSTREAMER_INTERFACE_LIBRARY} ${GOBJECT_LIBRARIES})
57 target_link_libraries(QtGstreamer LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY})
58
59
60 install(TARGETS QtGstreamer DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
61
62 foreach(header ${INSTALLED_HEADERS})
63     get_filename_component(header_path ${header} PATH)
64     install(FILES ${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtGstreamer/${header_path})
65 endforeach(header ${INSTALLED_HEADERS})