[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 2 Oct 2010 17:09:48 +0000 (17:09 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 2 Oct 2010 17:09:48 +0000 (17:09 +0000)
- Improve the IDL macro, along with some dependencies.

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

dll/win32/xmllite/CMakeLists.txt
include/reactos/idl/CMakeLists.txt

index f716647..e2b310a 100644 (file)
@@ -12,6 +12,6 @@ target_link_libraries(xmllite
     ${CMAKE_CURRENT_BINARY_DIR}/xmllite.def
     wine)
 
-add_importlibs(xmllite msvcrt kernel32 ntdll)
+add_importlibs(xmllite kernel32 ntdll)
 
 add_dependencies(xmllite xmllite_def psdk buildno_header)
index c226ccb..2ae12a9 100644 (file)
@@ -8,44 +8,45 @@ get_directory_property(defines COMPILE_DEFINITIONS)
 get_directory_property(includes INCLUDE_DIRECTORIES)
 
 foreach(arg ${defines})
-  set(result_defs ${result_defs} -D${arg})
+    set(result_defs ${result_defs} -D${arg})
 endforeach(arg ${defines})
 
 foreach(arg ${includes})
-  set(result_incs -I${arg} ${result_incs})
+    set(result_incs -I${arg} ${result_incs})
 endforeach(arg ${includes})
 
-MACRO (MACRO_IDL_FILES)
-
-  FOREACH(_in_FILE ${ARGN})
-
-    get_filename_component(FILE ${_in_FILE} NAME_WE)
-    add_custom_command(
-      OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
-      COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h -s -S ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
-      DEPENDS native-widl
-    )
-    set_source_files_properties(
-      ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
-      PROPERTIES GENERATED TRUE
-    )
-    add_library(${FILE}_server ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c)
+macro (MACRO_IDL_FILES)
+
+    foreach(_in_FILE ${ARGN})
+        get_filename_component(FILE ${_in_FILE} NAME_WE)
+        add_custom_command(
+            OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
+            COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h -s -S ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
+            DEPENDS native-widl)
+        set_source_files_properties(
+            ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
+            PROPERTIES GENERATED TRUE)
+        add_library(${FILE}_server ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c)
+        add_dependencies(${FILE}_server psdk)
     
-    add_custom_command(
-      OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
-      COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h -c -C ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
-      DEPENDS native-widl
-    )
-    set_source_files_properties(
-      ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
-      PROPERTIES GENERATED TRUE
-    )
-    add_library(${FILE}_client ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c)
-
-  ENDFOREACH(_in_FILE ${ARGN})
-
-ENDMACRO (MACRO_IDL_FILES)
-
-file(GLOB_RECURSE SOURCE "*.idl")
-LIST(REMOVE_ITEM SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/ms-dtyp.idl)
+        add_custom_command(
+            OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
+            COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h -c -C ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
+            DEPENDS native-widl)
+        set_source_files_properties(
+            ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
+            PROPERTIES GENERATED TRUE)
+        add_library(${FILE}_client ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c)
+        add_dependencies(${FILE}_client psdk)
+    endforeach(_in_FILE ${ARGN})
+
+endmacro (MACRO_IDL_FILES)
+
+list(APPEND SOURCE
+    eventlogrpc.idl
+    lsa.idl
+    pnp.idl
+    svcctl.idl
+    wlansvc.idl)
+
 MACRO_IDL_FILES(${SOURCE})