mirror of
				https://github.com/nicbarker/clay.git
				synced 2025-11-04 00:26:17 +00:00 
			
		
		
		
	Make Examples Optional in CMAKE
Makes including the examples optional. SDL2/SDL3 specifically have long download/build times. If they aren't being used, then this can dramatically speed up build times.
This commit is contained in:
		
							parent
							
								
									01d3ab127f
								
							
						
					
					
						commit
						e9d3125807
					
				| 
						 | 
				
			
			@ -3,17 +3,21 @@ project(clay)
 | 
			
		|||
 | 
			
		||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 | 
			
		||||
 | 
			
		||||
option(CLAY_INCLUDE_EXAMPLES "Build examples" OFF)
 | 
			
		||||
 | 
			
		||||
if(APPLE)
 | 
			
		||||
  enable_language(OBJC)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
add_subdirectory("examples/cpp-project-example")
 | 
			
		||||
add_subdirectory("examples/raylib-multi-context")
 | 
			
		||||
add_subdirectory("examples/raylib-sidebar-scrolling-container")
 | 
			
		||||
#  add_subdirectory("examples/cairo-pdf-rendering") Some issue with github actions populating cairo, disable for now
 | 
			
		||||
if(NOT MSVC)
 | 
			
		||||
  add_subdirectory("examples/clay-official-website")
 | 
			
		||||
  add_subdirectory("examples/SDL3-simple-demo")
 | 
			
		||||
endif()
 | 
			
		||||
add_subdirectory("examples/introducing-clay-video-demo")
 | 
			
		||||
add_subdirectory("examples/SDL2-video-demo")
 | 
			
		||||
if(CLAY_INCLUDE_EXAMPLES)
 | 
			
		||||
  add_subdirectory("examples/cpp-project-example")
 | 
			
		||||
  add_subdirectory("examples/raylib-multi-context")
 | 
			
		||||
  add_subdirectory("examples/raylib-sidebar-scrolling-container")
 | 
			
		||||
  #  add_subdirectory("examples/cairo-pdf-rendering") Some issue with github actions populating cairo, disable for now
 | 
			
		||||
  if(NOT MSVC)
 | 
			
		||||
    add_subdirectory("examples/clay-official-website")
 | 
			
		||||
    add_subdirectory("examples/SDL3-simple-demo")
 | 
			
		||||
  endif()
 | 
			
		||||
  add_subdirectory("examples/introducing-clay-video-demo")
 | 
			
		||||
  add_subdirectory("examples/SDL2-video-demo")
 | 
			
		||||
endif()
 | 
			
		||||
		Loading…
	
		Reference in a new issue