hedgewars/CMakeLists.txt
changeset 358 236bbd12d4d9
parent 357 165a040e4cfa
child 360 ab6a94334d6d
equal deleted inserted replaced
357:165a040e4cfa 358:236bbd12d4d9
    54 endif (fpc_executable)
    54 endif (fpc_executable)
    55 
    55 
    56 string(REGEX MATCH "[0-9]+\\.[0-9]+" dcc32version "${dcc32_output}")
    56 string(REGEX MATCH "[0-9]+\\.[0-9]+" dcc32version "${dcc32_output}")
    57 if (dcc32version)
    57 if (dcc32version)
    58 	set(pascal_compiler ${dcc32_executable})
    58 	set(pascal_compiler ${dcc32_executable})
    59 	set(pascal_compiler_flags "-B" "-W" "-E${EXECUTABLE_OUTPUT_PATH}" ${hwengine_project})
    59 	set(pascal_compiler_flags "-B" "-va" "-W" "-E${EXECUTABLE_OUTPUT_PATH}" ${hwengine_project})
    60 else (dcc32version)
    60 else (dcc32version)
    61 	string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" fpc_version "${fpc_output}")
    61 	string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" fpc_version "${fpc_output}")
    62 	if (fpc_version)
    62 	if (fpc_version)
    63 		string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}")
    63 		string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}")
    64 		string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" fpc_vers_minor "${fpc_version}")
    64 		string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" fpc_vers_minor "${fpc_version}")
    66 		math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}")
    66 		math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}")
    67 		if (fpc_ver LESS "010904")
    67 		if (fpc_ver LESS "010904")
    68 			message("Minimum required version of FreePascal is 1.9.4")
    68 			message("Minimum required version of FreePascal is 1.9.4")
    69 		else (fpc_ver LESS "010904")
    69 		else (fpc_ver LESS "010904")
    70 			set(pascal_compiler ${fpc_executable})
    70 			set(pascal_compiler ${fpc_executable})
    71 			set(pascal_compiler_flags "-FE../bin" "-Cs2000000" "-O2" ${hwengine_project})
    71 			set(pascal_compiler_flags "-B" "-FE../bin" "-Cs2000000" "-O2" ${hwengine_project})
    72 		endif (fpc_ver LESS "010904")
    72 		endif (fpc_ver LESS "010904")
    73 	endif (fpc_version)
    73 	endif (fpc_version)
    74 endif (dcc32version)
    74 endif (dcc32version)
    75 
    75 
    76 if (NOT pascal_compiler)
    76 if (NOT pascal_compiler)