--- a/hedgewars/CMakeLists.txt Thu Aug 17 18:16:51 2006 +0000
+++ b/hedgewars/CMakeLists.txt Fri Aug 18 14:17:25 2006 +0000
@@ -1,36 +1,36 @@
set(dcc32_tryexe dcc32.exe)
-set(ppc386_tryexe ppc386)
+set(fpc_tryexe fpc)
set(hwengine_project "hwengine.dpr")
find_program(dcc32_executable ${dcc32_tryexe})
-find_program(ppc386_executable ${ppc386_tryexe})
+find_program(fpc_executable ${fpc_tryexe})
if (dcc32_executable)
exec_program(${dcc32_executable} ARGS "--version" OUTPUT_VARIABLE dcc32_output)
endif (dcc32_executable)
-if (ppc386_executable)
- exec_program(${ppc386_executable} ARGS "-v" OUTPUT_VARIABLE ppc386_output)
-endif (ppc386_executable)
+if (fpc_executable)
+ exec_program(${fpc_executable} ARGS "-h" OUTPUT_VARIABLE fpc_output)
+endif (fpc_executable)
string(REGEX MATCH "[0-9]+\\.[0-9]+" dcc32version "${dcc32_output}")
if (dcc32version)
set(pascal_compiler ${dcc32_executable})
set(pascal_compiler_flags "-B -W "${hwengine_project})
else (dcc32version)
- string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" ppc386_version "${ppc386_output}")
- if (ppc386_version)
- string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" ppc386_vers_major "${ppc386_version}")
- string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" ppc386_vers_minor "${ppc386_version}")
- string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" ppc386_vers_patch "${ppc386_version}")
- math(EXPR ppc386_ver "${ppc386_vers_major}*10000 + ${ppc386_vers_minor}*100 + ${ppc386_vers_patch}")
- if (ppc386_ver LESS "010902")
+ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" fpc_version "${fpc_output}")
+ if (fpc_version)
+ string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}")
+ string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" fpc_vers_minor "${fpc_version}")
+ string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" fpc_vers_patch "${fpc_version}")
+ math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}")
+ if (fpc_ver LESS "010902")
message("Minimum required version of FreePascal is 1.9.2")
- else (ppc386_ver LESS "010902")
- set(pascal_compiler ${ppc386_executable})
- set(pascal_compiler_flags "-B -Sd -Xs -OG -O3 -Cs2000000 "${hwengine_project})
- endif (ppc386_ver LESS "010902")
- endif (ppc386_version)
+ else (fpc_ver LESS "010902")
+ set(pascal_compiler ${fpc_executable})
+ set(pascal_compiler_flags "-B" "-Sd" "-Xs" "-OG" "-O2" "-Cs2000000" ${hwengine_project})
+ endif (fpc_ver LESS "010902")
+ endif (fpc_version)
endif (dcc32version)
if (NOT pascal_compiler)