|  |  |  | @ -63,11 +63,31 @@ install( | 
			
		
	
		
			
				
					|  |  |  |  | 	DESTINATION bin | 
			
		
	
		
			
				
					|  |  |  |  | 	COMPONENT runtime | 
			
		
	
		
			
				
					|  |  |  |  | ) | 
			
		
	
		
			
				
					|  |  |  |  | install( | 
			
		
	
		
			
				
					|  |  |  |  | 	FILES ${PROJECT_SOURCE_DIR}/config | 
			
		
	
		
			
				
					|  |  |  |  | 	DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/sway/ | 
			
		
	
		
			
				
					|  |  |  |  | 	COMPONENT configuration | 
			
		
	
		
			
				
					|  |  |  |  | ) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | add_custom_target(configs ALL) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | function(add_config name source destination) | 
			
		
	
		
			
				
					|  |  |  |  |     add_custom_command( | 
			
		
	
		
			
				
					|  |  |  |  |         OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | 
			
		
	
		
			
				
					|  |  |  |  |         COMMAND sed -r | 
			
		
	
		
			
				
					|  |  |  |  |             's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g' | 
			
		
	
		
			
				
					|  |  |  |  |             ${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | 
			
		
	
		
			
				
					|  |  |  |  |         DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in | 
			
		
	
		
			
				
					|  |  |  |  |         COMMENT "Generating config file ${source}" | 
			
		
	
		
			
				
					|  |  |  |  |     ) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     install( | 
			
		
	
		
			
				
					|  |  |  |  |         FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | 
			
		
	
		
			
				
					|  |  |  |  |         DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${destination} | 
			
		
	
		
			
				
					|  |  |  |  |         COMPONENT configuration | 
			
		
	
		
			
				
					|  |  |  |  |     ) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 	add_custom_target(config-${name} DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}) | 
			
		
	
		
			
				
					|  |  |  |  |     add_dependencies(configs config-${name}) | 
			
		
	
		
			
				
					|  |  |  |  | endfunction() | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | add_config(config config sway) | 
			
		
	
		
			
				
					|  |  |  |  | add_config(security config.d/security sway/config.d) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | add_manpage(sway 1) | 
			
		
	
		
			
				
					|  |  |  |  | add_manpage(sway 5) | 
			
		
	
	
		
			
				
					|  |  |  | 
 |