hedgewars/CMakeLists.txt
changeset 360 ab6a94334d6d
parent 358 236bbd12d4d9
child 368 fe71e55d2d7b
--- a/hedgewars/CMakeLists.txt	Tue Jan 23 18:54:09 2007 +0000
+++ b/hedgewars/CMakeLists.txt	Tue Jan 23 21:24:18 2007 +0000
@@ -1,7 +1,6 @@
 configure_file(${hedgewars_SOURCE_DIR}/hedgewars/proto.inc.in 
 	${hedgewars_SOURCE_DIR}/hedgewars/proto.inc) 
 
-set(dcc32_tryexe "delphi!doesnt!work.exe")
 set(fpc_tryexe fpc)
 set(hwengine_project "hwengine.dpr")
 
@@ -42,36 +41,25 @@
 	tunsetborder.inc
 	)
 
-find_program(dcc32_executable ${dcc32_tryexe})
 find_program(fpc_executable ${fpc_tryexe})
 
-if (dcc32_executable)
-	 exec_program(${dcc32_executable} ARGS "--version" OUTPUT_VARIABLE dcc32_output)
-endif (dcc32_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" "-va" "-W" "-E${EXECUTABLE_OUTPUT_PATH}" ${hwengine_project})
-else (dcc32version)
-	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 "010904")
-			message("Minimum required version of FreePascal is 1.9.4")
-		else (fpc_ver LESS "010904")
-			set(pascal_compiler ${fpc_executable})
-			set(pascal_compiler_flags "-B" "-FE../bin" "-Cs2000000" "-O2" ${hwengine_project})
-		endif (fpc_ver LESS "010904")
-	endif (fpc_version)
-endif (dcc32version)
+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 "010904")
+		message("Minimum required version of FreePascal is 1.9.4")
+	else (fpc_ver LESS "010904")
+		set(pascal_compiler ${fpc_executable})
+		set(pascal_compiler_flags "-B" "-FE../bin" "-Cs2000000" "-O2" ${hwengine_project})
+	endif (fpc_ver LESS "010904")
+endif (fpc_version)
 
 if (NOT pascal_compiler)
 	message(FATAL_ERROR "No Pascal compiler found!")