Changeset View
Changeset View
Standalone View
Standalone View
find-modules/FindWaylandScanner.cmake
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | 113 | function(ecm_add_wayland_client_protocol out_var) | |||
---|---|---|---|---|---|
123 | set(_client_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.h") | 123 | set(_client_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.h") | ||
124 | set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-protocol.c") | 124 | set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-protocol.c") | ||
125 | 125 | | |||
126 | set_source_files_properties(${_client_header} GENERATED) | 126 | set_source_files_properties(${_client_header} GENERATED) | ||
127 | set_source_files_properties(${_code} GENERATED) | 127 | set_source_files_properties(${_code} GENERATED) | ||
128 | set_property(SOURCE ${_client_header} PROPERTY SKIP_AUTOMOC ON) | 128 | set_property(SOURCE ${_client_header} PROPERTY SKIP_AUTOMOC ON) | ||
129 | 129 | | |||
130 | add_custom_command(OUTPUT "${_client_header}" | 130 | add_custom_command(OUTPUT "${_client_header}" | ||
131 | COMMAND ${WaylandScanner_EXECUTABLE} client-header < ${_infile} > ${_client_header} | 131 | COMMAND ${WaylandScanner_EXECUTABLE} client-header ${_infile} ${_client_header} | ||
132 | DEPENDS ${_infile} VERBATIM) | 132 | DEPENDS ${_infile} VERBATIM) | ||
133 | 133 | | |||
134 | add_custom_command(OUTPUT "${_code}" | 134 | add_custom_command(OUTPUT "${_code}" | ||
135 | COMMAND ${WaylandScanner_EXECUTABLE} code < ${_infile} > ${_code} | 135 | COMMAND ${WaylandScanner_EXECUTABLE} code ${_infile} ${_code} | ||
136 | DEPENDS ${_infile} ${_client_header} VERBATIM) | 136 | DEPENDS ${_infile} ${_client_header} VERBATIM) | ||
137 | 137 | | |||
138 | list(APPEND ${out_var} "${_client_header}" "${_code}") | 138 | list(APPEND ${out_var} "${_client_header}" "${_code}") | ||
139 | set(${out_var} ${${out_var}} PARENT_SCOPE) | 139 | set(${out_var} ${${out_var}} PARENT_SCOPE) | ||
140 | endfunction() | 140 | endfunction() | ||
141 | 141 | | |||
142 | 142 | | |||
143 | function(ecm_add_wayland_server_protocol out_var) | 143 | function(ecm_add_wayland_server_protocol out_var) | ||
Show All 10 Lines | 152 | ecm_add_wayland_client_protocol(${out_var} | |||
154 | BASENAME ${ARGS_BASENAME}) | 154 | BASENAME ${ARGS_BASENAME}) | ||
155 | 155 | | |||
156 | get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) | 156 | get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) | ||
157 | set(_server_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-server-protocol.h") | 157 | set(_server_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-server-protocol.h") | ||
158 | set_property(SOURCE ${_server_header} PROPERTY SKIP_AUTOMOC ON) | 158 | set_property(SOURCE ${_server_header} PROPERTY SKIP_AUTOMOC ON) | ||
159 | set_source_files_properties(${_server_header} GENERATED) | 159 | set_source_files_properties(${_server_header} GENERATED) | ||
160 | 160 | | |||
161 | add_custom_command(OUTPUT "${_server_header}" | 161 | add_custom_command(OUTPUT "${_server_header}" | ||
162 | COMMAND ${WaylandScanner_EXECUTABLE} server-header < ${_infile} > ${_server_header} | 162 | COMMAND ${WaylandScanner_EXECUTABLE} server-header ${_infile} ${_server_header} | ||
163 | DEPENDS ${_infile} VERBATIM) | 163 | DEPENDS ${_infile} VERBATIM) | ||
164 | 164 | | |||
165 | list(APPEND ${out_var} "${_server_header}") | 165 | list(APPEND ${out_var} "${_server_header}") | ||
166 | set(${out_var} ${${out_var}} PARENT_SCOPE) | 166 | set(${out_var} ${${out_var}} PARENT_SCOPE) | ||
167 | endfunction() | 167 | endfunction() |