edit rpath manually, allowing frontend+libengine to run on linux too
authorkoda
Wed, 19 Dec 2012 19:33:49 +0100
changeset 8315 b3875e10a8ae
parent 8314 7faceaca67d4
child 8316 89232b2fa1d6
edit rpath manually, allowing frontend+libengine to run on linux too
QTfrontend/CMakeLists.txt
--- a/QTfrontend/CMakeLists.txt	Wed Dec 19 19:28:13 2012 +0100
+++ b/QTfrontend/CMakeLists.txt	Wed Dec 19 19:33:49 2012 +0100
@@ -179,6 +179,9 @@
     ${hwfr_rez_src}
     )
 
+if((UNIX AND NOT APPLE) AND ${BUILD_ENGINE_LIBRARY})
+    set_target_properties(hedgewars PROPERTIES LINK_FLAGS "-Wl,-rpath,${CMAKE_INSTALL_PREFIX}/${target_dir}")
+endif()
 
 set(HW_LINK_LIBS
     physfs