https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f6dea8b734f5a58b8439c…
commit f6dea8b734f5a58b8439c8ae4f7163692748e6a2
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Mar 10 14:41:13 2018 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Fri Mar 30 20:28:20 2018 +0200
[CMAKE] Avoid some uses of the LOCATION target property. CORE-14509
---
boot/freeldr/freeldr/CMakeLists.txt | 11 ++++-------
sdk/include/asm/CMakeLists.txt | 4 +---
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt
index af754c5bf3..63d985e920 100644
--- a/boot/freeldr/freeldr/CMakeLists.txt
+++ b/boot/freeldr/freeldr/CMakeLists.txt
@@ -268,17 +268,14 @@ endif()
add_dependencies(freeldr_pe asm)
add_dependencies(freeldr_pe_dbg asm)
-# Retrieve the full path to the generated file of the 'freeldr_pe' target
-get_target_property(_freeldr_pe_output_file freeldr_pe LOCATION)
-
if(NOT ARCH STREQUAL "arm")
concatenate_files(
${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
- ${_freeldr_pe_output_file})
+ ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:freeldr_pe>)
add_custom_target(freeldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys)
else()
- add_custom_target(freeldr ALL DEPENDS ${_freeldr_pe_output_file})
+ add_custom_target(freeldr ALL DEPENDS freeldr_pe)
endif()
# rename freeldr on livecd to setupldr.sys because isoboot.bin looks for setupldr.sys
@@ -289,10 +286,10 @@ if(NOT ARCH STREQUAL "arm")
concatenate_files(
${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
- ${_freeldr_pe_output_file})
+ ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:freeldr_pe>)
add_custom_target(setupldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys)
else()
- add_custom_target(setupldr ALL DEPENDS ${_freeldr_pe_output_file})
+ add_custom_target(setupldr ALL DEPENDS freeldr_pe)
endif()
add_cd_file(TARGET setupldr FILE ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys DESTINATION
loader NO_CAB FOR bootcd regtest)
diff --git a/sdk/include/asm/CMakeLists.txt b/sdk/include/asm/CMakeLists.txt
index d61ba661ef..5c4f01f6ba 100644
--- a/sdk/include/asm/CMakeLists.txt
+++ b/sdk/include/asm/CMakeLists.txt
@@ -18,11 +18,9 @@ elseif(ARCH STREQUAL "arm")
set(_filename ksarm.h)
endif()
-get_target_property(genincdata_dll genincdata LOCATION)
-
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_filename}
- COMMAND native-geninc ${genincdata_dll} ${CMAKE_CURRENT_BINARY_DIR}/${_filename}
${OPT_MS}
+ COMMAND native-geninc $<TARGET_FILE:genincdata>
${CMAKE_CURRENT_BINARY_DIR}/${_filename} ${OPT_MS}
DEPENDS genincdata native-geninc)
add_custom_target(asm