hedgewars/CMakeLists.txt
branchqmlfrontend
changeset 10817 48a53259fad8
parent 10616 20a2d5e6930a
parent 10803 df39aa3f6d4d
child 10888 a04e04aaf599
--- a/hedgewars/CMakeLists.txt	Mon Feb 02 23:12:56 2015 +0300
+++ b/hedgewars/CMakeLists.txt	Sat Feb 07 23:26:14 2015 +0300
@@ -21,12 +21,16 @@
 endif(UNIX)
 
 # convert list into pascal array
-list(LENGTH FONTS_DIRS ndirs)
-set(FONTS_DIRS_ARRAY "array [0..${ndirs}] of PChar = (")
-foreach(fontdir ${FONTS_DIRS})
-    set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\n'${fontdir}',")
-endforeach(fontdir)
-set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\nnil);\n")
+if(FONTS_DIRS)
+  list(LENGTH FONTS_DIRS ndirs)
+  set(FONTS_DIRS_ARRAY "array [0..${ndirs}] of PChar = (")
+  foreach(fontdir ${FONTS_DIRS})
+      set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\n_P'${fontdir}',")
+  endforeach(fontdir)
+  set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\nnil);\n")
+else(FONTS_DIRS)
+  set(FONTS_DIRS_ARRAY "array [0..1] of PChar = (nil, nil);")
+endif(FONTS_DIRS)
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})