project_files/hwc/CMakeLists.txt
branch0.9.21
changeset 10747 07ade56c3b4a
parent 10131 4b4a043111f4
child 11157 73036e057d32
--- a/project_files/hwc/CMakeLists.txt	Sun Jan 04 14:04:17 2015 -0500
+++ b/project_files/hwc/CMakeLists.txt	Tue Jan 06 17:07:34 2015 +0100
@@ -16,6 +16,18 @@
 include_directories(${SDL_INCLUDE_DIR})
 add_subdirectory(rtl)
 
+# convert list into pascal array
+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_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
 
 #get the list of pas files that are going to be converted and compiled