On linux set the rpath to $ORIGIN so that librenderdoc.so will be found

* Distributions will just be a tarball with binaries and library, so if
  the user doesn't install it somewhere in LD_LIBRARY_PATH, we want it
  to still work.
This commit is contained in:
baldurk
2016-08-25 11:15:42 +02:00
parent 963a2deb71
commit 5d859dfe5a
+5
View File
@@ -35,8 +35,13 @@ endif()
if(ANDROID)
add_library(renderdoccmd SHARED ${sources})
else()
set(CMAKE_SKIP_BUILD_RPATH TRUE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "$ORIGIN/")
add_executable(renderdoccmd ${sources})
endif()
target_include_directories(renderdoccmd ${includes})
target_link_libraries(renderdoccmd ${libraries})