[CMAKE/MIDL]

* Alter the way we handle the dlldata generation with midl. This works around the warnings we get about multiple rules to generate proxy.dlldata.c.
* Brought to yo by Peter Kummel.

svn path=/trunk/; revision=56731
This commit is contained in:
Amine Khaldi 2012-06-14 11:06:23 +00:00
parent 5821325f17
commit 23a661296c

View file

@ -38,16 +38,17 @@ function(add_rpcproxy_files)
get_includes(_includes) get_includes(_includes)
get_defines(_defines) get_defines(_defines)
set(_chain_dependency "") set(_chain_dependency "")
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c PROPERTIES GENERATED TRUE)
foreach(_idl_file ${ARGN}) foreach(_idl_file ${ARGN})
get_filename_component(_name_we ${_idl_file} NAME_WE) get_filename_component(_name_we ${_idl_file} NAME_WE)
add_custom_command( add_custom_command(
OUTPUT ${_name_we}_p.c ${_name_we}_p.h proxy.dlldata.c OUTPUT ${_name_we}_p.c ${_name_we}_p.h
COMMAND midl ${_includes} ${_defines} ${IDL_FLAGS} /client none /server none /proxy ${_name_we}_p.c /h ${_name_we}_p.h /dlldata proxy.dlldata.c ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file} COMMAND midl ${_includes} ${_defines} ${IDL_FLAGS} /client none /server none /proxy ${_name_we}_p.c /h ${_name_we}_p.h /dlldata proxy.dlldata.c ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file} ${_chain_dependency}) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file} ${_chain_dependency})
list(APPEND _chain_dependency ${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_p.c) list(APPEND _chain_dependency ${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_p.c)
list(APPEND _chain_dependency ${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_p.h) list(APPEND _chain_dependency ${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_p.h)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file})
endforeach() endforeach()
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c PROPERTIES GENERATED TRUE)
endfunction() endfunction()
function(add_rpc_files _type) function(add_rpc_files _type)