[CMAKE]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 28 Nov 2010 20:16:40 +0000 (20:16 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 28 Nov 2010 20:16:40 +0000 (20:16 +0000)
Make rpcproxy macro portable

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

CMakeMacros.cmake
gcc.cmake
msc.cmake

index 8f867df..852fd75 100644 (file)
@@ -172,8 +172,8 @@ macro(rpcproxy TARGET)
         get_filename_component(FILE ${_in_FILE} NAME_WE)\r
         add_custom_command(\r
             OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c\r
-            COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h -p -P ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl\r
-            DEPENDS native-widl)\r
+            COMMAND ${IDL_COMPILER} ${result_incs} ${result_defs} ${IDL_FLAGS} ${IDL_HEADER_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h ${IDL_PROXY_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl\r
+            DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl)\r
         set_source_files_properties(\r
             ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c\r
             PROPERTIES GENERATED TRUE)\r
@@ -184,17 +184,17 @@ macro(rpcproxy TARGET)
             DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c)\r
         #add_dependencies(${TARGET}_proxy ${TARGET}_${FILE}_p)\r
     endforeach(_in_FILE ${ARGN})\r
+\r
+    add_custom_command(\r
+        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c\r
+        COMMAND ${IDL_COMPILER} ${result_incs} ${result_defs} ${IDL_FLAGS} ${IDL_DLLDATA_ARG}${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c ${IDLS}\r
+        DEPENDS ${IDLS})\r
+    set_source_files_properties(\r
+        ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c\r
+        PROPERTIES GENERATED TRUE)\r
     \r
-       add_custom_command(\r
-           OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c\r
-           COMMAND native-widl ${result_incs} ${result_defs}  -m32 --win32 --dlldata-only --dlldata=${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c ${IDLS}\r
-           DEPENDS native-widl)\r
-       set_source_files_properties(\r
-           ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c\r
-           PROPERTIES GENERATED TRUE)\r
-        \r
-        add_library(${TARGET}_proxy ${SOURCE})\r
-        add_dependencies(${TARGET}_proxy psdk ${PROXY_DEPENDS})\r
+    add_library(${TARGET}_proxy ${SOURCE})\r
+    add_dependencies(${TARGET}_proxy psdk ${PROXY_DEPENDS})\r
 endmacro(rpcproxy)\r
 \r
 macro (MACRO_IDL_FILES)\r
index 7efe0d4..30d8c4b 100644 (file)
--- a/gcc.cmake
+++ b/gcc.cmake
@@ -190,6 +190,8 @@ set(IDL_HEADER_ARG -h -H) #.h
 set(IDL_TYPELIB_ARG -t -T) #.tlb
 set(IDL_SERVER_ARG -s -S) #.c for server library
 set(IDL_CLIENT_ARG -c -C) #.c for stub client library
+set(IDL_PROXY_ARG -p -P)
+set(IDL_DLLDATA_ARG --dlldata-only --dlldata=)
 
 macro(add_importlib_target _def_file)
   # empty for now, while import libs are shipped
index 029e186..3e74724 100644 (file)
--- a/msc.cmake
+++ b/msc.cmake
@@ -136,6 +136,8 @@ set(IDL_HEADER_ARG /h) #.h
 set(IDL_TYPELIB_ARG /tlb) #.tlb\r
 set(IDL_SERVER_ARG /sstub) #.c for stub server library\r
 set(IDL_CLIENT_ARG /cstub) #.c for stub client library\r
+set(IDL_PROXY_ARG /proxy)\r
+set(IDL_DLLDATA_ARG /dlldata )\r
 \r
 # Thanks MS for creating a stupid linker\r
 macro(add_importlib_target _spec_file)\r