Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-04-07 04:52:46 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-04-07 14:32:42 +0300
commitaaaa0a43af1b40b9de31a737a055b3d2f62b6458 (patch)
tree3389c63f8cf335552853e95177c19636d213de59 /build_files
parente953ada0bb9d22108e3a96b8faecfaa58c97caac (diff)
Build: use -no-pie for portable builds on Linux
Otherwise file browsers do not recognize the Blender executable. This is already done for official releases. We leave it off for non-portable builds, since that's how Linux distribution packages will typically build Blender and we can continue to follow the OS default there. Using a file browser to launch executables from e.g. /usr/bin would be rare as wel. Differential Revision: https://developer.blender.org/D7363
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/platform/platform_unix.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index cd304d65eac..050ab8f3ba1 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -606,3 +606,10 @@ endif()
set(PLATFORM_LINKFLAGS
"${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
)
+
+# Don't use position independent executable for portable install since file
+# browsers can't properly detect blender as an executable then. Still enabled
+# for non-portable installs as typically used by Linux distributions.
+if(WITH_INSTALL_PORTABLE)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")
+endif()