summaryrefslogtreecommitdiffstats
path: root/cmakemodules/MacroAddLinkFlags.cmake
blob: a10d39eadd7d02fa5c68b98e2e86787e5aea0897 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# - MACRO_ADD_LINK_FLAGS(<_target> "flags...")

# Copyright (c) 2006, Oswald Buddenhagen, <[email protected]>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

MACRO (MACRO_ADD_LINK_FLAGS _target _flg)

   GET_TARGET_PROPERTY(_flags ${_target} LINK_FLAGS)
   if (_flags)
      set(_flags "${_flags} ${_flg}")
   else (_flags)
      set(_flags "${_flg}")
   endif (_flags)
   SET_TARGET_PROPERTIES(${_target} PROPERTIES LINK_FLAGS "${_flags}")

ENDMACRO (MACRO_ADD_LINK_FLAGS)