[CMAKE]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 2 Dec 2010 22:16:59 +0000 (22:16 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 2 Dec 2010 22:16:59 +0000 (22:16 +0000)
Invoke spec2def only once to generate asm stub and def file.

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

msc.cmake

index 9d9fdc5..30c181b 100644 (file)
--- a/msc.cmake
+++ b/msc.cmake
@@ -142,15 +142,13 @@ set(IDL_DLLDATA_ARG /dlldata )
 macro(add_importlib_target _spec_file)\r
     get_filename_component(_name ${_spec_file} NAME_WE)\r
 \r
 macro(add_importlib_target _spec_file)\r
     get_filename_component(_name ${_spec_file} NAME_WE)\r
 \r
+    # Generate the asm stub file and the export def file\r
     add_custom_command(\r
         OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def\r
     add_custom_command(\r
         OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def\r
-        # Generate the asm stub file\r
-        COMMAND native-spec2def -l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}\r
-        # Generate a the export def file\r
-        COMMAND native-spec2def -@ -r -d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}\r
+        COMMAND native-spec2def -@ -r -d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def -l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}\r
         DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file})\r
 \r
         DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file})\r
 \r
-    # Assemble the file\r
+    # Assemble the stub file\r
     add_custom_command(\r
         OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj\r
         COMMAND ${CMAKE_ASM_COMPILER} /nologo /Fo${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj /c /Ta ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm\r
     add_custom_command(\r
         OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj\r
         COMMAND ${CMAKE_ASM_COMPILER} /nologo /Fo${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj /c /Ta ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm\r