[CMAKE]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 28 Nov 2010 16:12:25 +0000 (16:12 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 28 Nov 2010 16:12:25 +0000 (16:12 +0000)
Fix dependencies for importlib targets

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

msc.cmake

index 0c0a527..603e781 100644 (file)
--- a/msc.cmake
+++ b/msc.cmake
@@ -164,13 +164,14 @@ macro(add_importlib_target _spec_file)
     set(_libraries "")\r
     foreach(_lib ${ARGN})\r
         list(APPEND _libraries "${CMAKE_BINARY_DIR}/importlibs/${_lib}.lib")\r
+        list(APPEND _dependencies ${_lib})\r
     endforeach()\r
 \r
     # Build the importlib\r
     add_custom_command(\r
         OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib\r
         COMMAND LINK /LIB /NOLOGO /MACHINE:X86 /DEF:${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def /OUT:${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj ${_libraries}\r
-        DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def ${_libraries}\r
+        DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def\r
     )\r
 \r
     # Add the importlib target\r
@@ -178,6 +179,8 @@ macro(add_importlib_target _spec_file)
         lib${_name}\r
         DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib\r
     )\r
+    \r
+    add_dependencies(lib${_name} asm ${_dependencies})\r
 endmacro()\r
 \r
 macro(add_importlibs MODULE)\r