mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	cmake: Port misc options from Makefiles
- DEBUGMODE - MOBJCONSISTANCY - PACKETDROP - ZDEBUG - PROFILEMODE (likely moot, dunno how profiling with cmake works though)
This commit is contained in:
		
							parent
							
								
									146344e7de
								
							
						
					
					
						commit
						8116edc5a1
					
				
					 2 changed files with 25 additions and 1 deletions
				
			
		|  | @ -68,7 +68,13 @@ cmake_dependent_option( | |||
| ) | ||||
| option(SRB2_CONFIG_HWRENDER "Enable hardware render (OpenGL) support" ON) | ||||
| option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF) | ||||
| option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors. (C++ warnings are always treated as errors)" OFF) | ||||
| option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF) | ||||
| option(SRB2_CONFIG_DEBUGMODE "Compile with PARANOIA, ZDEBUG, RANGECHECK and PACKETDROP defined." OFF) | ||||
| option(SRB2_CONFIG_MOBJCONSISTANCY "Compile with MOBJCONSISTANCY defined." OFF) | ||||
| option(SRB2_CONFIG_PACKETDROP "Compile with PACKETDROP defined." OFF) | ||||
| option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF) | ||||
| # SRB2_CONFIG_PROFILEMODE is probably superceded by some CMake setting. | ||||
| option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF) | ||||
| set(SRB2_CONFIG_ASSET_DIRECTORY "" CACHE PATH "Path to directory that contains all asset files for the installer. If set, assets will be part of installation and cpack.") | ||||
| 
 | ||||
| # Enable CCache | ||||
|  |  | |||
|  | @ -348,6 +348,24 @@ if(${SRB2_CONFIG_DEV_BUILD}) | |||
| endif() | ||||
| target_compile_definitions(SRB2SDL2 PRIVATE -DCMAKECONFIG) | ||||
| 
 | ||||
| # Misc. build options from Makefiles | ||||
| if(SRB2_CONFIG_DEBUGMODE) | ||||
| 	target_compile_definitions(SRB2SDL2 PRIVATE -DZDEBUG -DPARANOIA -DRANGECHECK -DPACKETDROP) | ||||
| endif() | ||||
| if(SRB2_CONFIG_MOBJCONSISTANCY) | ||||
| 	target_compile_definitions(SRB2SDL2 PRIVATE -DMOBJCONSISTANCY) | ||||
| endif() | ||||
| if(SRB2_CONFIG_PACKETDROP) | ||||
| 	target_compile_definitions(SRB2SDL2 PRIVATE -DPACKETDROP) | ||||
| endif() | ||||
| if(SRB2_CONFIG_ZDEBUG) | ||||
| 	target_compile_definitions(SRB2SDL2 PRIVATE -DZDEBUG) | ||||
| endif() | ||||
| if(SRB2_CONFIG_PROFILEMODE AND "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") | ||||
| 	target_compile_options(SRB2SDL2 PRIVATE -pg) | ||||
| 	target_link_options(SRB2SDL2 PRIVATE -pg) | ||||
| endif() | ||||
| 
 | ||||
| add_subdirectory(sdl) | ||||
| add_subdirectory(objects) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Eidolon
						Eidolon