Author: tkreuzer
Date: Tue Nov 2 21:31:45 2010
New Revision: 49453
URL:
http://svn.reactos.org/svn/reactos?rev=49453&view=rev
Log:
[CMAKE]
- fix add_importlib_target
- fix win32dll entrypoint (we wouldn't need to specify one, if the one in mingw lib
had enough underscores)
Modified:
branches/cmake-bringup/msc.cmake
Modified: branches/cmake-bringup/msc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=494…
==============================================================================
--- branches/cmake-bringup/msc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/msc.cmake [iso-8859-1] Tue Nov 2 21:31:45 2010
@@ -63,7 +63,8 @@
set_entrypoint(${MODULE} mainCRTStartup)
endif ()
if(${TYPE} MATCHES win32dll)
- set_entrypoint(${MODULE} __DllMainCRTStartup)
+ # Need this only because mingw library is broken
+ set_entrypoint(${MODULE} DllMainCRTStartup@12)
if(DEFINED baseaddress_${MODULE})
set_image_base(${MODULE} ${baseaddress_${MODULE}})
else()
@@ -96,16 +97,21 @@
macro(add_importlib_target _def_file)
get_filename_component(_name ${_def_file} NAME_WE)
+ add_custom_command(
+ OUTPUT {CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
+ COMMAND LINK /LIB /MACHINE:X86 /DEF:${_def_file}
/OUT:${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
+ DEPENDS ${_def_file}
+ )
add_custom_target(
lib${_name}
- COMMAND LINK /LIB /MACHINE:X86 /DEF:${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
/OUT:${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
- DEPENDS ${_def_file})
+ 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)
- #add_dependencies(${MODULE} lib${LIB})
+ add_dependencies(${MODULE} lib${LIB})
endforeach()
endmacro()