Author: cfinck
Date: Fri Jan 13 16:39:33 2017
New Revision: 73540
URL:
http://svn.reactos.org/svn/reactos?rev=73540&view=rev
Log:
[CMAKE]
Call the NAME_ON_CD parameter RENAME (because it's not tied to a CD/ISO) and simplify
the implementation.
Modified:
trunk/reactos/sdk/cmake/CMakeMacros.cmake
Modified: trunk/reactos/sdk/cmake/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/CMakeMacros.cmak…
==============================================================================
--- trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] Fri Jan 13 16:39:33 2017
@@ -820,7 +820,7 @@
add_custom_target(rostests_install COMMAND ${CMAKE_COMMAND} -DCOMPONENT=rostests -P
${CMAKE_BINARY_DIR}/cmake_install.cmake)
function(add_rostests_file)
- cmake_parse_arguments(_ROSTESTS "" "SUBDIR;NAME_ON_CD;TARGET"
"FILE" ${ARGN})
+ cmake_parse_arguments(_ROSTESTS "" "RENAME;SUBDIR;TARGET"
"FILE" ${ARGN})
if(NOT (_ROSTESTS_TARGET OR _ROSTESTS_FILE))
message(FATAL_ERROR "You must provide a target or a file to install!")
endif()
@@ -829,22 +829,17 @@
get_target_property(_ROSTESTS_FILE ${_ROSTESTS_TARGET}
LOCATION_${CMAKE_BUILD_TYPE})
endif()
+ if(NOT _ROSTESTS_RENAME)
+ get_filename_component(_ROSTESTS_RENAME ${_ROSTESTS_FILE} NAME)
+ endif()
+
if(_ROSTESTS_SUBDIR)
set(_ROSTESTS_SUBDIR "/${_ROSTESTS_SUBDIR}")
endif()
- if(_ROSTESTS_NAME_ON_CD)
- add_cd_file(FILE ${_ROSTESTS_FILE} DESTINATION
"reactos/bin${_ROSTESTS_SUBDIR}" NAME_ON_CD ${_ROSTESTS_NAME_ON_CD} FOR all)
-
- if(DEFINED ENV{ROSTESTS_INSTALL})
- install(FILES ${_ROSTESTS_FILE} DESTINATION
"$ENV{ROSTESTS_INSTALL}${_ROSTESTS_SUBDIR}" COMPONENT rostests
RENAME${_ROSTESTS_NAME_ON_CD})
- endif()
- else()
- add_cd_file(FILE ${_ROSTESTS_FILE} DESTINATION
"reactos/bin${_ROSTESTS_SUBDIR}" FOR all)
-
- if(DEFINED ENV{ROSTESTS_INSTALL})
- install(FILES ${_ROSTESTS_FILE} DESTINATION
"$ENV{ROSTESTS_INSTALL}${_ROSTESTS_SUBDIR}" COMPONENT rostests)
- endif()
- endif()
-
-endfunction()
+ add_cd_file(FILE ${_ROSTESTS_FILE} DESTINATION
"reactos/bin${_ROSTESTS_SUBDIR}" NAME_ON_CD ${_ROSTESTS_RENAME} FOR all)
+
+ if(DEFINED ENV{ROSTESTS_INSTALL})
+ install(FILES ${_ROSTESTS_FILE} DESTINATION
"$ENV{ROSTESTS_INSTALL}${_ROSTESTS_SUBDIR}" COMPONENT rostests RENAME
${_ROSTESTS_RENAME})
+ endif()
+endfunction()