Author: gadamopoulos
Date: Fri Jan 13 15:15:55 2017
New Revision: 73537
URL:
http://svn.reactos.org/svn/reactos?rev=73537&view=rev
Log:
[CMakeMacros.cmake] - Add NAME_ON_CD parameter to add_rostests_file to make it possible to
select a different name for a file.
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 15:15:55 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;TARGET"
"FILE" ${ARGN})
+ cmake_parse_arguments(_ROSTESTS "" "SUBDIR;NAME_ON_CD;TARGET"
"FILE" ${ARGN})
if(NOT (_ROSTESTS_TARGET OR _ROSTESTS_FILE))
message(FATAL_ERROR "You must provide a target or a file to install!")
endif()
@@ -833,9 +833,18 @@
set(_ROSTESTS_SUBDIR "/${_ROSTESTS_SUBDIR}")
endif()
- 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()
-endfunction()
+ 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()