diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-04-07 04:52:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-04-07 14:32:42 +0300 |
commit | aaaa0a43af1b40b9de31a737a055b3d2f62b6458 (patch) | |
tree | 3389c63f8cf335552853e95177c19636d213de59 /build_files | |
parent | e953ada0bb9d22108e3a96b8faecfaa58c97caac (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.cmake | 7 |
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() |