| 1 |
# - MACRO_ADD_LINK_FLAGS(target_name flag1 ... flagN) |
| 2 |
|
| 3 |
# Copyright (c) 2006, Oswald Buddenhagen, <[email protected]> |
| 4 |
# Copyright (c) 2006, Andreas Schneider, <[email protected]> |
| 5 |
# |
| 6 |
# Redistribution and use is allowed according to the terms of the BSD license. |
| 7 |
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
| 8 |
|
| 9 |
macro (MACRO_ADD_LINK_FLAGS _target) |
| 10 |
|
| 11 |
get_target_property(_flags ${_target} LINK_FLAGS) |
| 12 |
if (_flags) |
| 13 |
set(_flags "${_flags} ${ARGN}") |
| 14 |
else (_flags) |
| 15 |
set(_flags "${ARGN}") |
| 16 |
endif (_flags) |
| 17 |
|
| 18 |
set_target_properties(${_target} PROPERTIES LINK_FLAGS "${_flags}") |
| 19 |
|
| 20 |
endmacro (MACRO_ADD_LINK_FLAGS) |