[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 24 Dec 2010 12:08:24 +0000 (12:08 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 24 Dec 2010 12:08:24 +0000 (12:08 +0000)
- Add a macro to handle IDL interfaces.

svn path=/branches/cmake-bringup/; revision=50119

CMakeMacros.cmake

index 852fd75..ff7b827 100644 (file)
@@ -236,3 +236,12 @@ macro(ADD_TYPELIB TARGET)
   endforeach()\r
   add_custom_target(${TARGET} ALL DEPENDS ${OBJECTS})\r
 endmacro()\r
+\r
+macro(add_idl_interface IDL_FILE)\r
+    custom_incdefs()\r
+    get_filename_component(FILE ${IDL_FILE} NAME_WE)\r
+    add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_i.c\r
+                       COMMAND ${IDL_COMPILER} ${result_incs} ${result_defs} -m32 --win32 -u -U ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_i.c ${CMAKE_CURRENT_SOURCE_DIR}/${IDL_FILE}\r
+                       DEPENDS ${IDL_FILE})\r
+    set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${FILE}_i.c PROPERTIES GENERATED TRUE)\r
+endmacro()\r