Author: tkreuzer
Date: Sun Oct 31 17:31:05 2010
New Revision: 49377
URL:
http://svn.reactos.org/svn/reactos?rev=49377&view=rev
Log:
[CMAKE]
Implement add_importlib_target macro to build importlibs for MSVC. We can't use
MSVC's libraries, as they are incomplete.
gcc version does nothing.
Modified:
branches/cmake-bringup/gcc.cmake
branches/cmake-bringup/msc.cmake
Modified: branches/cmake-bringup/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=493…
==============================================================================
--- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Sun Oct 31 17:31:05 2010
@@ -157,4 +157,8 @@
set(IDL_SERVER_ARG -s -S) #.c for server library
set(IDL_CLIENT_ARG -c -C) #.c for stub client library
-endif()
+macro(add_importlib_target _name)
+ # empty for now, while import libs are shipped
+endmacro()
+
+endif()
Modified: branches/cmake-bringup/msc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=493…
==============================================================================
--- branches/cmake-bringup/msc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/msc.cmake [iso-8859-1] Sun Oct 31 17:31:05 2010
@@ -48,12 +48,6 @@
set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS})
endmacro()
-macro(add_importlibs MODULE)
- foreach(LIB ${ARGN})
- target_link_libraries(${MODULE} ${LIB}.LIB)
- endforeach()
-endmacro()
-
macro(set_module_type MODULE TYPE)
add_dependencies(${MODULE} psdk buildno_header)
if(${TYPE} MATCHES nativecui)
@@ -87,4 +81,25 @@
set(IDL_SERVER_ARG /sstub) #.c for stub server library
set(IDL_CLIENT_ARG /cstub) #.c for stub client library
-endif()
+
+macro(add_importlib_target _name)
+ add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
+ COMMAND LINK /LIB /MACHINE:X86 /DEF:${CMAKE_CURRENT_BINARY_DIR}/${_name}.def
/OUT:${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_name}.def
+ )
+ add_custom_target(lib${_name}
+ DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
+ )
+endmacro()
+
+macro(add_importlibs MODULE)
+ foreach(LIB ${ARGN})
+ target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.lib)
+ endforeach()
+endmacro()
+
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/importlibs)
+
+endif()
+