1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix cross-building by ensuring output path is set

This commit is contained in:
Travis Wrightsman 2025-04-17 12:35:31 +02:00 committed by GitHub
parent 7375358afd
commit 0695541bf5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -591,9 +591,12 @@ if(USE_CURL)
endif() endif()
# When cross-compiling assume the user doesn't want to run the executable anyway, # When cross-compiling place the executable in <build dir>/bin so that multiple
# otherwise place it in <source dir>/bin/ since Luanti can only run from there. # targets can be built from the same source folder. Otherwise, place it in
if(NOT CMAKE_CROSSCOMPILING) # <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") set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
endif() endif()