https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f9e1e23dab6a6d8386905…
commit f9e1e23dab6a6d83869052ca2f524cea1762e3b8
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Fri Mar 30 13:03:40 2018 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Fri Mar 30 20:28:25 2018 +0200
[CMAKE] Avoid use of the LOCATION property for asm16 files. CORE-14509
In particular, ntvdm needs to post-process
command.com, so this adds
a BINARY_PATH property to such files instead.
---
subsystems/mvdm/asm16.cmake | 6 ++----
subsystems/mvdm/dos/CMakeLists.txt | 2 +-
subsystems/mvdm/ntvdm/CMakeLists.txt | 8 ++------
3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/subsystems/mvdm/asm16.cmake b/subsystems/mvdm/asm16.cmake
index c25f676c73..4aea5f884b 100644
--- a/subsystems/mvdm/asm16.cmake
+++ b/subsystems/mvdm/asm16.cmake
@@ -56,8 +56,7 @@ function(add_asm16_bin _target _binary_file _base_address)
add_custom_target(${_target} ALL DEPENDS ${_binary_file})
# set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${_target} SUFFIX
".bin")
- set_target_properties(${_target} PROPERTIES LOCATION_${CMAKE_BUILD_TYPE}
${_binary_file}) ## Support of $<TARGET_FILE:xxx> is limited to add_executable() or
add_library()
- set_target_properties(${_target} PROPERTIES LOCATION ${_binary_file})
## Support of $<TARGET_FILE:xxx> is limited to add_executable() or
add_library()
+ set_target_properties(${_target} PROPERTIES BINARY_PATH ${_binary_file})
add_clean_target(${_target})
endfunction()
@@ -120,8 +119,7 @@ function(add_asm16_bin _target _binary_file _base_address)
add_custom_target(${_target} ALL DEPENDS ${_binary_file})
# set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${_target} SUFFIX
".bin")
- set_target_properties(${_target} PROPERTIES LOCATION_${CMAKE_BUILD_TYPE}
${_binary_file}) ## Support of $<TARGET_FILE:xxx> is limited to add_executable() or
add_library()
- set_target_properties(${_target} PROPERTIES LOCATION ${_binary_file})
## Support of $<TARGET_FILE:xxx> is limited to add_executable() or
add_library()
+ set_target_properties(${_target} PROPERTIES BINARY_PATH ${_binary_file})
add_clean_target(${_target})
endfunction()
diff --git a/subsystems/mvdm/dos/CMakeLists.txt b/subsystems/mvdm/dos/CMakeLists.txt
index bf7f56383a..dd6b45ff01 100644
--- a/subsystems/mvdm/dos/CMakeLists.txt
+++ b/subsystems/mvdm/dos/CMakeLists.txt
@@ -1,4 +1,4 @@
include_directories(${REACTOS_SOURCE_DIR}/subsystems/mvdm/dos)
add_asm16_bin(command ${CMAKE_CURRENT_BINARY_DIR}/command.com 0x0100 command.S)
-add_cd_file(TARGET command DESTINATION reactos/system32 FOR all)
+add_cd_file(TARGET command FILE $<TARGET_PROPERTY:command,BINARY_PATH> DESTINATION
reactos/system32 FOR all)
diff --git a/subsystems/mvdm/ntvdm/CMakeLists.txt b/subsystems/mvdm/ntvdm/CMakeLists.txt
index 30a4398702..ff102d8857 100644
--- a/subsystems/mvdm/ntvdm/CMakeLists.txt
+++ b/subsystems/mvdm/ntvdm/CMakeLists.txt
@@ -4,14 +4,10 @@ PROJECT(NTVDM)
#####################################
# Generate the integrated
COMMAND.COM
#
-
-# Retrieve the full path to the generated file of the 'command' target
-get_target_property(_command_com_file command LOCATION)
-
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/command_com.c
${CMAKE_CURRENT_BINARY_DIR}/command_com.h
- COMMAND native-bin2c ${_command_com_file} ${CMAKE_CURRENT_BINARY_DIR}/command_com.c
${CMAKE_CURRENT_BINARY_DIR}/command_com.h BIN CommandCom
- DEPENDS native-bin2c command ${_command_com_file})
+ COMMAND native-bin2c $<TARGET_PROPERTY:command,BINARY_PATH>
${CMAKE_CURRENT_BINARY_DIR}/command_com.c ${CMAKE_CURRENT_BINARY_DIR}/command_com.h BIN
CommandCom
+ DEPENDS native-bin2c command)
#####################################
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/fast486)