aboutsummaryrefslogtreecommitdiff
path: root/src/lua/cmake/CustomMacros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/cmake/CustomMacros.cmake')
-rw-r--r--src/lua/cmake/CustomMacros.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lua/cmake/CustomMacros.cmake b/src/lua/cmake/CustomMacros.cmake
new file mode 100644
index 000000000..9318ea4eb
--- /dev/null
+++ b/src/lua/cmake/CustomMacros.cmake
@@ -0,0 +1,14 @@
+
+macro(add_target_properties _target _name)
+ set(_properties)
+ foreach(_prop ${ARGN})
+ set(_properties "${_properties} ${_prop}")
+ endforeach(_prop)
+ get_target_property(_old_properties ${_target} ${_name})
+ 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)
+