[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Wed, 12 Dec 2012 15:39:08 +0000 (15:39 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Wed, 12 Dec 2012 15:39:08 +0000 (15:39 +0000)
* Addendum to r57893.

svn path=/trunk/; revision=57894

reactos/cmake/midl-support.cmake

index e8793d1..997d71b 100644 (file)
@@ -79,20 +79,22 @@ function(add_rpc_files _type)
     endforeach()
 endfunction()
 
-function(generate_idl_iids _idl_file)
-    get_includes(_includes)
-    get_defines(_defines)
+function(generate_idl_iids)
+    foreach(_idl_file ${ARGN})
+        get_includes(_includes)
+        get_defines(_defines)
 
-    if(NOT IS_ABSOLUTE ${_idl_file})
-        set(_idl_file "${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file}")
-    endif()
+        if(NOT IS_ABSOLUTE ${_idl_file})
+            set(_idl_file "${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file}")
+        endif()
 
-    get_filename_component(_name_we ${_idl_file} NAME_WE)
-    add_custom_command(
-        OUTPUT ${_name_we}_i.c ${_name_we}_i.h
-        COMMAND midl ${_includes} ${_defines} ${IDL_FLAGS} /h ${_name_we}_i.h /client none /server none /iid ${_name_we}_i.c /proxy ${_name_we}_dummy_p.c ${_idl_file}
-        DEPENDS ${_idl_file})
-    set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_i.c PROPERTIES GENERATED TRUE)
+        get_filename_component(_name_we ${_idl_file} NAME_WE)
+        add_custom_command(
+            OUTPUT ${_name_we}_i.c ${_name_we}_i.h
+            COMMAND midl ${_includes} ${_defines} ${IDL_FLAGS} /h ${_name_we}_i.h /client none /server none /iid ${_name_we}_i.c /proxy ${_name_we}_dummy_p.c ${_idl_file}
+            DEPENDS ${_idl_file})
+        set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_i.c PROPERTIES GENERATED TRUE)
+    endforeach()
 endfunction()
 
 function(add_iid_library _target)