562
|
1 |
file(GLOB BaseMusic *.ogg)
|
|
2 |
|
563
|
3 |
list(LENGTH BaseMusic PlayListLength)
|
|
4 |
|
|
5 |
set(PlayListINCFile ${hedgewars_SOURCE_DIR}/hedgewars/playlist.inc)
|
|
6 |
|
|
7 |
file(WRITE ${PlayListINCFile} "const cPlayListLength = " ${PlayListLength} ";")
|
|
8 |
file(APPEND ${PlayListINCFile} "playlist = array[0..Pred(cPlayListLength)] of string = (")
|
|
9 |
|
|
10 |
set(i ${PlayListLength})
|
|
11 |
foreach(musicfile ${BaseMusic})
|
|
12 |
math(EXPR i "${i} - 1")
|
|
13 |
|
|
14 |
get_filename_component(relfilename ${musicfile} NAME)
|
|
15 |
|
|
16 |
file(APPEND ${PlayListINCFile} '${relfilename}')
|
|
17 |
|
|
18 |
if(i GREATER 0)
|
|
19 |
file(APPEND ${PlayListINCFile} ",")
|
|
20 |
endif(i GREATER 0)
|
|
21 |
endforeach(musicfile)
|
|
22 |
|
|
23 |
file(APPEND ${PlayListINCFile} ");")
|
|
24 |
|
|
25 |
file(APPEND ${PlayListINCFile} "var playlistchain = array[0..Pred(cPlayListLength)] of LongWord;")
|
|
26 |
|
|
27 |
|
562
|
28 |
install(FILES
|
|
29 |
${BaseMusic}
|
|
30 |
DESTINATION ${SHAREPATH}Data/Music)
|