* Add the ability to handle more than one idl file in generate_idl_iids.

svn path=/trunk/; revision=57893
This commit is contained in:
Amine Khaldi 2012-12-12 15:09:49 +00:00
parent 74b1cd4a03
commit c410c0a203

View file

@ -82,21 +82,23 @@ function(add_rpc_files __type)
endforeach() endforeach()
endfunction() endfunction()
function(generate_idl_iids IDL_FILE) function(generate_idl_iids)
get_filename_component(FILE ${IDL_FILE} NAME) foreach(IDL_FILE ${ARGN})
if(FILE STREQUAL "${IDL_FILE}") get_filename_component(FILE ${IDL_FILE} NAME)
set(IDL_FILE_FULL "${CMAKE_CURRENT_SOURCE_DIR}/${IDL_FILE}") if(FILE STREQUAL "${IDL_FILE}")
else() set(IDL_FILE_FULL "${CMAKE_CURRENT_SOURCE_DIR}/${IDL_FILE}")
set(IDL_FILE_FULL ${IDL_FILE}) else()
endif() set(IDL_FILE_FULL ${IDL_FILE})
get_includes(INCLUDES) endif()
get_defines(DEFINES) get_includes(INCLUDES)
get_filename_component(NAME ${IDL_FILE} NAME_WE) get_defines(DEFINES)
add_custom_command( get_filename_component(NAME ${IDL_FILE} NAME_WE)
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c add_custom_command(
COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} -u -o ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c ${IDL_FILE_FULL} OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c
DEPENDS ${IDL_FILE_FULL} native-widl) COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} -u -o ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c ${IDL_FILE_FULL}
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c PROPERTIES GENERATED TRUE) DEPENDS ${IDL_FILE_FULL} native-widl)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c PROPERTIES GENERATED TRUE)
endforeach()
endfunction() endfunction()
function(add_iid_library TARGET) function(add_iid_library TARGET)