summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2013-09-13 11:17:52 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2013-09-13 11:17:52 +0000
commite2f8dbdc97d9aa16babc80c6203d2f786926058b (patch)
treeabc67d860846699cb0de64879ea12f9041eb893f
parent83abe5bc6cec539455ec311f39a13c56d000bd60 (diff)
downloadlighttpd-e2f8dbdc97d9aa16babc80c6203d2f786926058b.tar.gz
fix link order for -Wl,--as-needed
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@2906 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--cmake/LighttpdMacros.cmake18
1 files changed, 11 insertions, 7 deletions
diff --git a/cmake/LighttpdMacros.cmake b/cmake/LighttpdMacros.cmake
index b9d1019e..1a7b9877 100644
--- a/cmake/LighttpdMacros.cmake
+++ b/cmake/LighttpdMacros.cmake
@@ -32,11 +32,15 @@ MACRO(ADD_TARGET_PROPERTIES _target _name _properties)
SET(_properties ${ARGV})
LIST(REMOVE_AT _properties 0)
LIST(REMOVE_AT _properties 0)
- GET_TARGET_PROPERTY(_old_properties ${_target} ${_name})
- MESSAGE("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}")
+ IF(${_name} STREQUAL LINK_FLAGS)
+ TARGET_LINK_LIBRARIES(${_target} "${_properties}")
+ ELSE()
+ GET_TARGET_PROPERTY(_old_properties ${_target} ${_name})
+ MESSAGE("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}")
+ ENDIF()
ENDMACRO(ADD_TARGET_PROPERTIES)