]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
radiant: build PIE linux binary on FHS installation
authorThomas Debesse <dev@illwieckz.net>
Mon, 8 Mar 2021 13:10:22 +0000 (14:10 +0100)
committerThomas Debesse <dev@illwieckz.net>
Mon, 8 Mar 2021 13:18:53 +0000 (14:18 +0100)
radiant/CMakeLists.txt

index aa52ef32ed842f2a75f83a7b62468f7f56a5b7f9..3537a7ddc6ed326643ab2b3f5623c7a2d2380cc6 100644 (file)
@@ -136,10 +136,18 @@ endif ()
 # because of a mistake in the mime-type library.
 # Because of that it was not possible to launch such executables from
 # the file browser.
 # because of a mistake in the mime-type library.
 # Because of that it was not possible to launch such executables from
 # the file browser.
+#
 # While the problem is fixed upstream, most distributions still ship
 # with a faulty mime-type library and may do for a long time.
 # While the problem is fixed upstream, most distributions still ship
 # with a faulty mime-type library and may do for a long time.
+#
 # See: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/11
 # See: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/11
-if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+#
+# It may produce such warning though at strip time:
+#   warning: allocated section `.dynstr' not in segment
+# and produce an unusable binary, better not strip when using this hack.
+#
+# This hack is only wanted when NetRadiant is not installed system-wide.
+if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux"    AND NOT FHS_INSTALL)
     target_link_libraries(${RADIANT_BASENAME} -no-pie)
 endif()
 
     target_link_libraries(${RADIANT_BASENAME} -no-pie)
 endif()