mirror of
https://github.com/termux/termux-packages.git
synced 2025-02-22 23:57:09 +00:00
29 lines
1.6 KiB
Diff
29 lines
1.6 KiB
Diff
Normally, Luanti does not set the EXECUTABLE_OUTPUT_PATH variable when cross-compiling is detected,
|
|
because Luanti does not officially cross-compile for any platforms that require EXECUTABLE_OUTPUT_PATH.
|
|
|
|
Later on elsewhere in the CMakeLists.txt, there is this logic: "if not ANDROID... then if UNIX...
|
|
then create a symlink in the EXECUTABLE_OUTPUT_PATH".
|
|
|
|
https://github.com/minetest/minetest/blob/6a1d22b2c516abbb9ce9670dedff47451317706f/src/CMakeLists.txt#L1045-L1054
|
|
|
|
A different patch, 0003-bionic-libc-x11-wsi-opengl-es-2.patch, replaces the ANDROID variable there
|
|
to force this codepath, but the reason this patch is not combined into that patch is because this patch
|
|
is technically only required for cross-compiling,
|
|
while building the package in non-cross-compiling mode does not actually require this
|
|
change in order to work, so it seemed appropriate to organize them in separate patches.
|
|
|
|
This prevents the error "CMake Error: failed to create symbolic link '/minetest': Permission denied",
|
|
which is the error that happens if EXECUTABLE_OUTPUT_PATH does not exist when that linked point
|
|
in the CMakeLists.txt is reached, and normally happens only when cross-compiling Luanti.
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -569,7 +569,7 @@ 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)
|
|
+if(NOT DISABLING_THIS_BECAUSE_IT_IS_FOR_BUILDING_AN_APK)
|
|
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
|
|
endif()
|
|
|