mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 20:47:21 +00:00
[CMAKE] Allow overriding the .dll extension for delay imports in MSVC builds.
Fixes delay-importing winspool.drv.
This commit is contained in:
parent
2b4d5c5cff
commit
b20280a0f9
4 changed files with 11 additions and 5 deletions
|
@ -326,7 +326,8 @@ function(add_delay_importlibs _module)
|
|||
message(FATAL_ERROR "Cannot add delay imports to a static library")
|
||||
endif()
|
||||
foreach(_lib ${ARGN})
|
||||
target_link_libraries(${_module} lib${_lib}_delayed)
|
||||
get_filename_component(_basename "${_lib}" NAME_WE)
|
||||
target_link_libraries(${_module} lib${_basename}_delayed)
|
||||
endforeach()
|
||||
target_link_libraries(${_module} delayimp)
|
||||
endfunction()
|
||||
|
|
|
@ -336,8 +336,13 @@ function(add_delay_importlibs _module)
|
|||
message(FATAL_ERROR "Cannot add delay imports to a static library")
|
||||
endif()
|
||||
foreach(_lib ${ARGN})
|
||||
add_target_link_flags(${_module} "/DELAYLOAD:${_lib}.dll")
|
||||
target_link_libraries(${_module} lib${_lib})
|
||||
get_filename_component(_basename "${_lib}" NAME_WE)
|
||||
get_filename_component(_ext "${_lib}" EXT)
|
||||
if(NOT _ext)
|
||||
set(_ext ".dll")
|
||||
endif()
|
||||
add_target_link_flags(${_module} "/DELAYLOAD:${_basename}${_ext}")
|
||||
target_link_libraries(${_module} "lib${_basename}")
|
||||
endforeach()
|
||||
target_link_libraries(${_module} delayimp)
|
||||
endfunction()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue