| 
									
										
										
										
											2023-01-14 20:37:42 +01:00
										 |  |  | if(NOT FTXUI_BUILD_EXAMPLES)
 | 
					
						
							|  |  |  |   return()
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-31 22:02:48 +05:30
										 |  |  | set(EXAMPLES_DIR ${CMAKE_CURRENT_SOURCE_DIR})
 | 
					
						
							|  |  |  | function(example name)
 | 
					
						
							| 
									
										
										
										
											2021-12-23 14:17:33 +01:00
										 |  |  |   add_executable(ftxui_example_${name} ${name}.cpp)
 | 
					
						
							|  |  |  |   target_link_libraries(ftxui_example_${name} PUBLIC ${DIRECTORY_LIB})
 | 
					
						
							| 
									
										
										
										
											2021-07-31 22:02:48 +05:30
										 |  |  |   file(RELATIVE_PATH dir ${EXAMPLES_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
 | 
					
						
							|  |  |  |   set_property(GLOBAL APPEND PROPERTY FTXUI::EXAMPLES ${dir}/${name})
 | 
					
						
							| 
									
										
										
										
											2023-07-26 01:02:37 +02:00
										 |  |  |   target_compile_features(ftxui_example_${name} PRIVATE cxx_std_20)
 | 
					
						
							| 
									
										
										
										
											2021-07-31 22:02:48 +05:30
										 |  |  | endfunction(example)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-02 22:33:59 +01:00
										 |  |  | add_subdirectory(component)
 | 
					
						
							|  |  |  | add_subdirectory(dom)
 | 
					
						
							| 
									
										
										
										
											2021-03-22 00:26:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | if (EMSCRIPTEN)
 | 
					
						
							| 
									
										
										
										
											2021-07-31 22:02:48 +05:30
										 |  |  |   get_property(EXAMPLES GLOBAL PROPERTY FTXUI::EXAMPLES)
 | 
					
						
							| 
									
										
										
										
											2021-03-22 00:26:52 +01:00
										 |  |  |   foreach(file | 
					
						
							|  |  |  |       "index.html"
 | 
					
						
							| 
									
										
										
										
											2023-11-19 12:09:52 +01:00
										 |  |  |       "index.mjs"
 | 
					
						
							|  |  |  |       "index.css"
 | 
					
						
							| 
									
										
										
										
											2021-07-31 22:02:48 +05:30
										 |  |  |       "run_webassembly.py")
 | 
					
						
							|  |  |  |     configure_file(${file} ${file})
 | 
					
						
							| 
									
										
										
										
											2021-03-22 00:26:52 +01:00
										 |  |  |   endforeach(file)
 | 
					
						
							|  |  |  | endif()
 |