https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e394a1312a94b0e524e7c…
commit e394a1312a94b0e524e7ce92e42f0e2c75213d04
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Sun Jan 3 04:06:51 2021 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Sun Jan 3 04:06:51 2021 +0300
[CMAKE] Replace CMAKE_AR with CMAKE_LINKER /LIB for msvc
Render the command to a variable for dealing with quotes properly
Addendum to ca1b2ada343a7ca2edd556f013ed55622318039d and
b96e88894a4d55f5e8b94430deeb0f086151b24f
---
sdk/cmake/msvc.cmake | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index ee6c343451d..3b70fd92744 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -317,12 +317,13 @@ function(generate_import_lib _libname _dllname _spec_file)
set(_libfile_tmp ${CMAKE_CURRENT_BINARY_DIR}/${_libname}_tmp.lib)
set(_static_lib_options )
+ set(_implib_command ${CMAKE_LINKER} /LIB /NOLOGO /MACHINE:${WINARCH}
+ $<TARGET_PROPERTY:${_libname},STATIC_LIBRARY_FLAGS>
$<TARGET_PROPERTY:${_libname},STATIC_LIBRARY_OPTIONS>
+ /DEF:${_def_file} /OUT:${_libfile_tmp} ${_asm_stubs_file}.obj)
+
add_custom_command(
OUTPUT ${_libfile_tmp}
- COMMAND
- ${CMAKE_AR} /NOLOGO /MACHINE:${WINARCH}
- $<TARGET_PROPERTY:${_libname},STATIC_LIBRARY_FLAGS>
$<TARGET_PROPERTY:${_libname},STATIC_LIBRARY_OPTIONS>
- /DEF:${_def_file} /OUT:${_libfile_tmp} ${_asm_stubs_file}.obj
+ COMMAND ${_implib_command}
DEPENDS ${_asm_stubs_file}.obj ${_def_file})
# By giving the import lib as an object input, LIB extracts the relevant object files
and make a new library.