merge git head
authorsheepluva
Tue, 06 Jan 2015 16:38:39 +0100
changeset 10782 6feaf9a863dd
parent 10779 d85fe0cb5df2 (current diff)
parent 10781 d48a14222956 (diff)
child 10783 8e742c9ffdf8
child 10784 3f689d3e28eb
merge git head
--- a/hedgewars/CMakeLists.txt	Tue Jan 06 12:52:37 2015 +0300
+++ b/hedgewars/CMakeLists.txt	Tue Jan 06 16:38:39 2015 +0100
@@ -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})
--- a/hedgewars/config.inc.in	Tue Jan 06 12:52:37 2015 +0300
+++ b/hedgewars/config.inc.in	Tue Jan 06 16:38:39 2015 +0100
@@ -26,8 +26,4 @@
       cRevisionString = '${HEDGEWARS_REVISION}';
       cHashString = '${HEDGEWARS_HASH}';
       cDefaultPathPrefix = '${HEDGEWARS_FULL_DATADIR}/Data';
-{$IFDEF PAS2C}
-      cFontsPaths: array[0..1] of PChar = (nil, nil);
-{$ELSE}
       cFontsPaths: ${FONTS_DIRS_ARRAY}
-{$ENDIF}
--- a/project_files/hwc/CMakeLists.txt	Tue Jan 06 12:52:37 2015 +0300
+++ b/project_files/hwc/CMakeLists.txt	Tue Jan 06 16:38:39 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