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