File: updatesources.sh

package info (click to toggle)
eln 1.5.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,876 kB
  • sloc: cpp: 26,606; perl: 796; python: 437; sh: 73; makefile: 32; xml: 8
file content (21 lines) | stat: -rwxr-xr-x 991 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

SUBDIRS="App ToolScene Dialogs Gui Book Data File Items Scenes AutoNote"

cd `dirname $0`
cd ../src

echo "# Automatically generated by updatesources.sh" > CMakeLists.txt
echo "" >> CMakeLists.txt

for DIR in $SUBDIRS; do
    echo "include(src/$DIR/CMakeLists.txt)" >> CMakeLists.txt
    echo "target_include_directories(notedeln PRIVATE src/$DIR)" >> CMakeLists.txt

    echo "# Automatically generated by updatesources.sh" > $DIR/CMakeLists.txt
    echo "" >> $DIR/CMakeLists.txt
    find $DIR -name \*.h -exec echo "target_sources(notedeln PRIVATE " 'src/{}' ")" ';' | sort -df >> $DIR/CMakeLists.txt
    find $DIR -name \*.cpp -exec echo "target_sources(notedeln PRIVATE " 'src/{}' ")" ';' | sort -df >> $DIR/CMakeLists.txt
    find $DIR -name \*.qrc -exec echo "target_sources(notedeln PRIVATE " 'src/{}' ")" ';' | sort -df >> $DIR/CMakeLists.txt
    find $DIR -name \*.ui -exec echo "target_sources(notedeln PRIVATE " 'src/{}' ")" ';' | sort -df >> $DIR/CMakeLists.txt
done