diff -r 7faceaca67d4 -r b3875e10a8ae 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