15
12
# Macro to run codegen from the subdirs
16
13
macro(run_codegen _dir_name _includes _headers)
17
set(_prefixed_headers "")
18
foreach(_header ${_headers})
19
list(APPEND _prefixed_headers ${_dir_name}/${_header})
22
add_custom_command(OUTPUT gen.cpp
24
ARGS ${_includes} ${_prefixed_headers}
25
> ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
26
DEPENDS codegen ${_headers}
27
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
14
if (QTGSTREAMER_CODEGEN)
15
set(_prefixed_headers "")
16
foreach(_header ${_headers})
17
list(APPEND _prefixed_headers ${_dir_name}/${_header})
20
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/gen.cpp
22
ARGS ${_includes} ${_prefixed_headers}
23
> ${CMAKE_CURRENT_SOURCE_DIR}/gen.cpp
24
DEPENDS codegen ${_headers}
25
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
28
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
29
COMMAND ${CMAKE_COMMAND}
30
ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gen.cpp
31
${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
32
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gen.cpp
33
COMMENT "Copying gen.cpp to the build directory")
30
36
# Macro to install headers from the subdirs
44
50
add_subdirectory(QGlib)
45
51
add_subdirectory(QGst)
53
# Build the qml plugin
54
if (QT_QTDECLARATIVE_FOUND)
47
58
# Install the cmake scripts that are used to find the installed library from external projects
48
59
install(EXPORT ${EXPORT_TARGET_SET} DESTINATION ${LIB_INSTALL_DIR}/QtGStreamer)
49
60
install(FILES ${CMAKE_SOURCE_DIR}/cmake/modules/FindQtGStreamer.cmake