CMakeLists.txt
changeset 2664 949c189ba568
parent 2663 d53918cd22bb
child 2666 2b8c8f16421e
equal deleted inserted replaced
2663:d53918cd22bb 2664:949c189ba568
    40 		set(minimum_macosx ${current_macosx_version})
    40 		set(minimum_macosx ${current_macosx_version})
    41 	endif()
    41 	endif()
    42 
    42 
    43 	#create universal binaries only when it's time to bundle the application
    43 	#create universal binaries only when it's time to bundle the application
    44 	IF(BUNDLE)
    44 	IF(BUNDLE)
       
    45 		set(WITH_SERVER false)
    45 		if(current_macosx_version MATCHES "10.6")
    46 		if(current_macosx_version MATCHES "10.6")
    46 			set(CMAKE_OSX_ARCHITECTURES "x86_64;i386;ppc7400")	
    47 			set(CMAKE_OSX_ARCHITECTURES "x86_64;i386")	#;ppc7400
    47 		else()
    48 		else()
    48 			set(CMAKE_OSX_ARCHITECTURES "i386;ppc7400")
    49 			set(CMAKE_OSX_ARCHITECTURES "i386")	#;ppc7400
    49 		endif()
    50 		endif()
    50 	ENDIF()	
    51 	ENDIF()	
    51 
    52 
    52 	message(STATUS "Target system: Mac OS X ${minimum_macosx} ${CMAKE_OSX_ARCHITECTURES}")	
    53 	message(STATUS "Target system: Mac OS X ${minimum_macosx} ${CMAKE_OSX_ARCHITECTURES}")	
    53 
    54 
    86 set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG")
    87 set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG")
    87 set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
    88 set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
    88 set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
    89 set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
    89 set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
    90 set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
    90 
    91 
    91 set(pascal_compiler_flags_cmn "-B" "-FE../bin" "-Fl../bin/" "-Cs2000000" "-vwi")
    92 set(pascal_compiler_flags_cmn "-B" "-FE../bin" "-Fl../bin/" "-Cs2000000" "-vwi" "/Users/vittorio/hedge.build/trunk/SDLMain.o")
    92 if(LOWRES)
    93 if(LOWRES)
    93 	set(pascal_compiler_flags_cmn "-dLOWRES" ${pascal_compiler_flags_cmn})
    94 	set(pascal_compiler_flags_cmn "-dLOWRES" ${pascal_compiler_flags_cmn})
    94 	add_definitions(-DLOWRES)
    95 	add_definitions(-DLOWRES)
    95 endif(LOWRES)
    96 endif(LOWRES)
    96 
    97 
    97 if(Optz)
    98 if(Optz)
    98 	set(pascal_compiler_flags_cmn "-O2" "-Xs" "-Si" "-Or" ${pascal_compiler_flags_cmn})
    99 	set(pascal_compiler_flags_cmn "-O2" "-Xs" "-Si" ${pascal_compiler_flags_cmn})
    99 	set(haskell_compiler_flags_cmn "-w" "-O2")
   100 	set(haskell_compiler_flags_cmn "-w" "-O2")
   100 else(Optz)
   101 else(Optz)
   101 	set(pascal_compiler_flags_cmn "-O-" "-gl" "-dDEBUGFILE" "-pg" "-vv" ${pascal_compiler_flags_cmn})
   102 	set(pascal_compiler_flags_cmn "-O-" "-gl" "-dDEBUGFILE" "-pg" "-vv" ${pascal_compiler_flags_cmn})
   102 	set(haskell_compiler_flags_cmn "-Wall" "-debug" "-dcore-lint")
   103 	set(haskell_compiler_flags_cmn "-Wall" "-debug" "-dcore-lint")
   103 endif(Optz)
   104 endif(Optz)
   114 set(HEDGEWARS_PROTO_VER 30)
   115 set(HEDGEWARS_PROTO_VER 30)
   115 
   116 
   116 if(WITH_SERVER)
   117 if(WITH_SERVER)
   117 	set(HAVE_NETSERVER true)
   118 	set(HAVE_NETSERVER true)
   118 	add_subdirectory(gameServer)
   119 	add_subdirectory(gameServer)
       
   120 	if(APPLE)
       
   121 		#workaround for http://hackage.haskell.org/trac/ghc/ticket/3400
       
   122 		set(haskell_compiler_flags_cmn ${haskell_compiler_flags_cmn} "-optc-m32" "-opta-m32" "-optl-m32")
       
   123 	endif()
   119 else(WITH_SERVER)
   124 else(WITH_SERVER)
   120 	set(HAVE_NETSERVER false)
   125 	set(HAVE_NETSERVER false)
   121 endif(WITH_SERVER)
   126 endif(WITH_SERVER)
   122 
   127 
   123 
   128