File: find-music-in-root-for-multi-source.patch

package info (click to toggle)
colobot 0.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 415,532 kB
  • sloc: cpp: 129,246; ansic: 8,872; python: 2,158; sh: 672; awk: 91; xml: 35; makefile: 31
file content (21 lines) | stat: -rw-r--r-- 1,024 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Cope with the music orig.tar being unpacked in music/ and not in data/music
Author: Didier Raboud <odyx@debian.org>
Origin: vendor
Forwarded: not-needed
Last-Update: 2015-09-16
--- a/data/music/CMakeLists.txt
+++ b/data/music/CMakeLists.txt
@@ -66,10 +66,9 @@ if(MUSIC)
             set(DOWNLOAD_FILE ${FILENAME}.ogg)
         endif()
 
-        # If the required file is already available in source directory, don't download
-        if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${DOWNLOAD_FILE}")
-            message(STATUS "Music file ${DOWNLOAD_FILE} already downloaded")
-            set(DOWNLOAD_FILE_LOC "${CMAKE_CURRENT_SOURCE_DIR}/${DOWNLOAD_FILE}")
+        # If the required file is already available in the root music/ source directory, don't download
+        if(EXISTS "${CMAKE_SOURCE_DIR}/music/${DOWNLOAD_FILE}")
+            set(DOWNLOAD_FILE_LOC "${CMAKE_SOURCE_DIR}/music/${DOWNLOAD_FILE}")
         else()
             message(STATUS "Downloading ${DOWNLOAD_FILE}...")
             file(DOWNLOAD