Author: tkreuzer
Date: Thu Aug 11 13:39:06 2011
New Revision: 53178
URL:
http://svn.reactos.org/svn/reactos?rev=53178&view=rev
Log:
[CMAKE]
Add add_delay_importlibs for MSVC
Modified:
trunk/reactos/cmake/msvc.cmake
trunk/reactos/dll/win32/rpcrt4/CMakeLists.txt
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=53178…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Thu Aug 11 13:39:06 2011
@@ -177,8 +177,12 @@
endfunction()
macro(add_delay_importlibs MODULE)
- # TODO. For now forward to normal import libs
- add_importlibs(${MODULE} ${ARGN})
+ foreach(LIB ${ARGN})
+ add_linkerflag(${MODULE} "/DELAYLOAD:${LIB}.dll")
+ target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.LIB)
+ add_dependencies(${MODULE} lib${LIB})
+ endforeach()
+ target_link_libraries(${MODULE} delayimp)
endmacro()
function(spec2def _dllname _spec_file)
Modified: trunk/reactos/dll/win32/rpcrt4/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/CMakeList…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rpcrt4/CMakeLists.txt [iso-8859-1] Thu Aug 11 13:39:06 2011
@@ -1,11 +1,5 @@
add_rpc_files(client epm.idl)
-
-# HACK!!!!!!
-if(MSVC)
- set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> /nologo <DEFINES>
/Fo<OBJECT> /Fd<TARGET_PDB> -c <SOURCE> <FLAGS>")
- set_source_files_properties(rpc_transport.c PROPERTIES COMPILE_FLAGS "/link
/DELAYLOAD:wininet.dll")
-endif()
list(APPEND SOURCE
cproxy.c
@@ -43,7 +37,7 @@
-D_RPCRT4_
-DCOM_NO_WINDOWS_H
-DMSWMSG)
-
+
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(rpcrt4.dll rpcrt4.spec)
@@ -56,16 +50,9 @@
wine
uuid
${PSEH_LIB})
-
-if(NOT MSVC)
- add_delay_importlibs(rpcrt4 wininet)
-else()
- add_importlibs(rpcrt4 wininet)
- add_linkerflag(rpcrt4 "/DELAYLOAD:wininet.dll")
- target_link_libraries(rpcrt4 delayimp)
-endif()
-
add_importlibs(rpcrt4 msvcrt user32 advapi32 secur32 iphlpapi ws2_32 kernel32 ntdll)
+add_delay_importlibs(rpcrt4 wininet)
+
add_cd_file(TARGET rpcrt4 DESTINATION reactos/system32 FOR all)
add_importlib_target(rpcrt4.spec)