mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
[CMAKE]
Add add_delay_importlibs for MSVC svn path=/trunk/; revision=53178
This commit is contained in:
parent
248fe419e0
commit
044e4532ea
2 changed files with 9 additions and 18 deletions
|
@ -177,8 +177,12 @@ function(add_importlib_target _exports_file)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
macro(add_delay_importlibs MODULE)
|
macro(add_delay_importlibs MODULE)
|
||||||
# TODO. For now forward to normal import libs
|
foreach(LIB ${ARGN})
|
||||||
add_importlibs(${MODULE} ${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()
|
endmacro()
|
||||||
|
|
||||||
function(spec2def _dllname _spec_file)
|
function(spec2def _dllname _spec_file)
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
|
|
||||||
add_rpc_files(client epm.idl)
|
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
|
list(APPEND SOURCE
|
||||||
cproxy.c
|
cproxy.c
|
||||||
cpsf.c
|
cpsf.c
|
||||||
|
@ -57,15 +51,8 @@ target_link_libraries(rpcrt4
|
||||||
uuid
|
uuid
|
||||||
${PSEH_LIB})
|
${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_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_cd_file(TARGET rpcrt4 DESTINATION reactos/system32 FOR all)
|
||||||
add_importlib_target(rpcrt4.spec)
|
add_importlib_target(rpcrt4.spec)
|
||||||
|
|
Loading…
Reference in a new issue