https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fad4b34db7b61af39bf0f…
commit fad4b34db7b61af39bf0f0efac624c6e0d5cda19
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Apr 27 11:26:03 2019 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sat Apr 27 14:29:33 2019 +0200
[CMAKE] Fix LINK_DEPENDS usage
Up to CMake 3.3 LINK_DEPENDS was ignored in non-Makefile generators. See also
http://www.cmake.org/pipermail/cmake/2010-May/037206.html. Since CMake 3.4 it is no longer
ignored, but requires CMP0005 policy to be set to NEW and it requires a full path which
was already correctly used on GCC, but not on MSVC builds.
---
sdk/cmake/gcc.cmake | 3 ---
sdk/cmake/msvc.cmake | 5 +----
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake
index 220e868067..71971f2b6f 100644
--- a/sdk/cmake/gcc.cmake
+++ b/sdk/cmake/gcc.cmake
@@ -467,8 +467,5 @@ endmacro()
function(add_linker_script _target _linker_script_file)
get_filename_component(_file_full_path ${_linker_script_file} ABSOLUTE)
add_target_link_flags(${_target} "-Wl,-T,${_file_full_path}")
-
- # Unfortunately LINK_DEPENDS is ignored in non-Makefile generators (for now...)
- # See also
http://www.cmake.org/pipermail/cmake/2010-May/037206.html
add_target_property(${_target} LINK_DEPENDS ${_file_full_path})
endfunction()
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index e3319a1eee..f7dc1544ce 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -612,9 +612,6 @@ function(add_linker_script _target _linker_script_file)
# add_custom_target("${_target}_${_file_name}" ALL DEPENDS
${_generated_file})
# add_dependencies(${_target} "${_target}_${_file_name}")
add_target_link_flags(${_target} "@${_generated_file}")
-
- # Unfortunately LINK_DEPENDS is ignored in non-Makefile generators (for now...)
- # See also
http://www.cmake.org/pipermail/cmake/2010-May/037206.html
- add_target_property(${_target} LINK_DEPENDS ${_generated_file})
+ add_target_property(${_target} LINK_DEPENDS ${_file_full_path})
endif()
endfunction()