CMakeLists.txt
changeset 6538 5a1f49d84d95
parent 6537 1df1f224f3e9
child 6605 800d4c029d53
equal deleted inserted replaced
6537:1df1f224f3e9 6538:5a1f49d84d95
    77 	#if nothing is set, we deploy only for the current system
    77 	#if nothing is set, we deploy only for the current system
    78 	if(NOT minimum_macosx_version)
    78 	if(NOT minimum_macosx_version)
    79 		set(minimum_macosx_version ${current_macosx_version})
    79 		set(minimum_macosx_version ${current_macosx_version})
    80 	endif()
    80 	endif()
    81 
    81 
    82 	#who uses them anyway?
    82 	#lower systems don't have enough processing power anyways
    83 	if (minimum_macosx_version LESS "10.4")
    83 	if (minimum_macosx_version LESS "10.4")
    84 		message(FATAL_ERROR "Hedgewars is not supported on Mac OS X pre-10.4")
    84 		message(FATAL_ERROR "Hedgewars is not supported on Mac OS X pre-10.4")
    85 	endif()
    85 	endif()
    86 
    86 
    87 	#this variable needs to be set for frapascal universal binary
    87 	#this variable needs to be set for freepascal universal binary
    88 	if(NOT CMAKE_OSX_ARCHITECTURES)
    88 	if(NOT CMAKE_OSX_ARCHITECTURES)
    89 		if(current_macosx_version LESS "10.6")
    89 		if(current_macosx_version LESS "10.6")
    90 			if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc*")
    90 			if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc*")
    91 				set(CMAKE_OSX_ARCHITECTURES "ppc7400")
    91 				set(CMAKE_OSX_ARCHITECTURES "ppc7400")
    92 			else()
    92 			else()
   146 endif()
   146 endif()
   147 
   147 
   148 
   148 
   149 #set default flags values for all the project
   149 #set default flags values for all the project
   150 set(CMAKE_C_FLAGS "-pipe ${CMAKE_C_FLAGS}")
   150 set(CMAKE_C_FLAGS "-pipe ${CMAKE_C_FLAGS}")
   151 set(CMAKE_C_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}")
   151 set(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}")
   152 set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}")
   152 set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}")
   153 set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
   153 set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
   154 set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
   154 set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
   155 set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
   155 set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
   156 
   156 
   157 set(pascal_compiler_flags_cmn "-B" "-FE../bin" "-Cs2000000" "-vewn" ${pascal_compiler_flags_cmn})
   157 set(pascal_compiler_flags_cmn "-B" "-FE../bin" "-Cs2000000" "-vewn" ${pascal_compiler_flags_cmn})
       
   158 set(haskell_compiler_flags_cmn "-O2" ${haskell_compiler_flags_cmn})
   158 
   159 
   159 if(Optz)
   160 if(Optz)
   160 #	set(pascal_compiler_flags_cmn "-O3" "-OpPENTIUM4" "-CfSSE3" "-Xs" "-Si" ${pascal_compiler_flags_cmn})
   161 #	set(pascal_compiler_flags_cmn "-O3" "-OpPENTIUM4" "-CfSSE3" "-Xs" "-Si" ${pascal_compiler_flags_cmn})
   161 	set(pascal_compiler_flags_cmn "-O2" "-Xs" "-Si" ${pascal_compiler_flags_cmn})
   162 	set(pascal_compiler_flags_cmn "-Os" "-Xs" "-Si" ${pascal_compiler_flags_cmn})
   162 	set(haskell_compiler_flags_cmn "-O2" "-w" "-fno-warn-unused-do-bind")
   163 	set(haskell_compiler_flags_cmn "-w" "-fno-warn-unused-do-bind" ${haskell_compiler_flags_cmn})
   163 else(Optz)
   164 else(Optz)
   164 #	set(pascal_compiler_flags_cmn "-O-" "-g" "-gh" "-gl" "-dDEBUGFILE" ${pascal_compiler_flags_cmn})
   165 	set(pascal_compiler_flags_cmn "-O-" "-g" "-gl" "-gv" "-dDEBUGFILE" ${pascal_compiler_flags_cmn})
   165 	set(pascal_compiler_flags_cmn "-O-" "-g" "-gl" "-dDEBUGFILE" ${pascal_compiler_flags_cmn})
   166 	set(haskell_compiler_flags_cmn "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind" ${haskell_compiler_flags_cmn})
   166 	set(haskell_compiler_flags_cmn "-O2" "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind")
       
   167 endif(Optz)
   167 endif(Optz)
   168 
   168 
   169 
   169 
   170 if(DEFINED DATA_INSTALL_DIR)
   170 if(DEFINED DATA_INSTALL_DIR)
   171 	set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/)
   171 	set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/)