hedgewars/CMakeLists.txt
changeset 196 993cf173218b
parent 193 56885ea29202
child 220 d79eaeaf969d
equal deleted inserted replaced
195:edae828322a0 196:993cf173218b
    22 	if (fpc_version)
    22 	if (fpc_version)
    23 		string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}")
    23 		string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}")
    24 		string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" fpc_vers_minor "${fpc_version}")
    24 		string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" fpc_vers_minor "${fpc_version}")
    25 		string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" fpc_vers_patch "${fpc_version}")
    25 		string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" fpc_vers_patch "${fpc_version}")
    26 		math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}")
    26 		math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}")
    27 		if (fpc_ver LESS "010906")
    27 		if (fpc_ver LESS "010904")
    28 			message("Minimum required version of FreePascal is 1.9.6")
    28 			message("Minimum required version of FreePascal is 1.9.4")
    29 		else (fpc_ver LESS "010906")
    29 		else (fpc_ver LESS "010904")
    30 			set(pascal_compiler ${fpc_executable})
    30 			set(pascal_compiler ${fpc_executable})
    31 			set(pascal_compiler_flags "-B" "-Sd" "-Xs" "-OG" "-O2" "-Cs2000000" ${hwengine_project})
    31 			set(pascal_compiler_flags "-B" "-Sd" "-Xs" "-OG" "-O2" "-Cs2000000" ${hwengine_project})
    32 		endif (fpc_ver LESS "010906")
    32 		endif (fpc_ver LESS "010904")
    33 	endif (fpc_version)
    33 	endif (fpc_version)
    34 endif (dcc32version)
    34 endif (dcc32version)
    35 
    35 
    36 if (NOT pascal_compiler)
    36 if (NOT pascal_compiler)
    37 	message(FATAL_ERROR "No Pascal compiler found!")
    37 	message(FATAL_ERROR "No Pascal compiler found!")