aboutsummaryrefslogtreecommitdiff
path: root/modules/MacroAppendDirectoryProperties.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2006-02-07 21:49:31 +0000
committerAlexander Neundorf <neundorf@kde.org>2006-02-07 21:49:31 +0000
commitfce52d437088520993f5f0df591408aa7e8e6eb4 (patch)
tree99b58b5ce2657a75b95a118c157c92ac0612b8f6 /modules/MacroAppendDirectoryProperties.cmake
parent33ef2dcde9be9d37e41a3c905f85849e918a240a (diff)
downloadextra-cmake-modules-fce52d437088520993f5f0df591408aa7e8e6eb4.tar.gz
extra-cmake-modules-fce52d437088520993f5f0df591408aa7e8e6eb4.tar.bz2
two new macros: macro_append_directory_properties() and macro_append_source_files_properties()
don't use CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH in FindKDE4.cmake clean more files Alex svn path=/trunk/KDE/kdelibs/; revision=506927
Diffstat (limited to 'modules/MacroAppendDirectoryProperties.cmake')
-rw-r--r--modules/MacroAppendDirectoryProperties.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/MacroAppendDirectoryProperties.cmake b/modules/MacroAppendDirectoryProperties.cmake
new file mode 100644
index 00000000..2fed5a55
--- /dev/null
+++ b/modules/MacroAppendDirectoryProperties.cmake
@@ -0,0 +1,19 @@
+# - MACRO_APPEND_DIRECTORY_PROPERTIES(PROPERTIES key values...)
+# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
+
+MACRO(MACRO_APPEND_DIRECTORY_PROPERTIES _properties _property)
+ GET_DIRECTORY_PROPERTY(_tmp_DIR_PROPS ${_property} )
+ IF (NOT _tmp_DIR_PROPS)
+ SET(_tmp_DIR_PROPS)
+ ENDIF (NOT _tmp_DIR_PROPS)
+ FOREACH(_value ${ARGN})
+ IF (_tmp_DIR_PROPS)
+ SET(_tmp_DIR_PROPS ${_tmp_DIR_PROPS} ${_value})
+ ELSE (_tmp_DIR_PROPS)
+ SET(_tmp_DIR_PROPS ${_value})
+ ENDIF (_tmp_DIR_PROPS)
+ ENDFOREACH(_value ${ARGN})
+
+ SET_DIRECTORY_PROPERTIES(${_properties} ${_property} "${_tmp_DIR_PROPS}")
+ENDMACRO(MACRO_APPEND_DIRECTORY_PROPERTIES)
+