mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 01:05:48 +01:00 
			
		
		
		
	Fix cross-building by ensuring output path is set
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							7375358afd
						
					
				
				
					commit
					0695541bf5
				
			@@ -591,9 +591,12 @@ if(USE_CURL)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# When cross-compiling assume the user doesn't want to run the executable anyway,
 | 
			
		||||
# otherwise place it in <source dir>/bin/ since Luanti can only run from there.
 | 
			
		||||
if(NOT CMAKE_CROSSCOMPILING)
 | 
			
		||||
# When cross-compiling place the executable in <build dir>/bin so that multiple
 | 
			
		||||
# targets can be built from the same source folder. Otherwise, place it in
 | 
			
		||||
# <source dir>/bin/ since Luanti can only run from there.
 | 
			
		||||
if(CMAKE_CROSSCOMPILING)
 | 
			
		||||
	set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
 | 
			
		||||
else()
 | 
			
		||||
	set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user