aboutsummaryrefslogtreecommitdiff
path: root/cmake/AddTargetProperties.cmake
blob: 17ee774ffe0987f322b99d4bd15b97b40a911dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
MACRO(ADD_TARGET_PROPERTIES _target _name)
  SET(_properties)
  FOREACH(_prop ${ARGN})
    SET(_properties "${_properties} ${_prop}")
  ENDFOREACH(_prop)
  GET_TARGET_PROPERTY(_old_properties ${_target} ${_name})
  MESSAGE(STATUS "adding property to ${_target} ${_name}:" ${_properties})
  IF(NOT _old_properties)
    # in case it's NOTFOUND
    SET(_old_properties)
  ENDIF(NOT _old_properties)
  SET_TARGET_PROPERTIES(${_target} PROPERTIES ${_name} "${_old_properties} ${_properties}")
ENDMACRO(ADD_TARGET_PROPERTIES)