From 55763badae9118135126c4c623cd0c7f09183c09 Mon Sep 17 00:00:00 2001 From: Tomáš Chvátal Date: Sun, 21 Jun 2009 19:38:15 +0200 Subject: Use macro for sources addition. Fix typo in findzip. --- cmake/MacroAddSources.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 cmake/MacroAddSources.cmake (limited to 'cmake/MacroAddSources.cmake') diff --git a/cmake/MacroAddSources.cmake b/cmake/MacroAddSources.cmake new file mode 100644 index 0000000..62c1381 --- /dev/null +++ b/cmake/MacroAddSources.cmake @@ -0,0 +1,9 @@ +# This macro is for generating the sources list from in-folder files. +MACRO(MacroAddSources) + FILE ( GLOB src ${fn}/*.c ) + FOREACH ( fle ${src} ) + GET_FILENAME_COMPONENT ( fnp ${fle} NAME_WE ) + GET_FILENAME_COMPONENT ( pth ${fle} PATH ) + SET ( SRC_${fn} ${SRC_${fn}} ${pth}/${fnp} ) + ENDFOREACH ( fle ) +ENDMACRO(MacroAddSources) -- cgit v1.2.3