diff --git a/cmake b/cmake
index 00bcc53e001a89e7579c4c3ca7483ffdc28e9a0d..6f76c37d7e2a002b2be138e4a0fb383e3043eb9c 160000
--- a/cmake
+++ b/cmake
@@ -1 +1 @@
-Subproject commit 00bcc53e001a89e7579c4c3ca7483ffdc28e9a0d
+Subproject commit 6f76c37d7e2a002b2be138e4a0fb383e3043eb9c
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 9b149957907742602eba0eceb7cd5c42f7c33e60..380cf67cbbb2daea7e5938eed538cb28c316ce5f 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -43,8 +43,10 @@ set_target_properties(
              RUNTIME_OUTPUT_DIRECTORY_<CONFIG>
              "${CMAKE_BINARY_DIR}/python/${PROJECT_NAME}")
 
-if(UNIX AND NOT APPLE)
-  set_target_properties(${PYWRAP} PROPERTIES INSTALL_RPATH "\$ORIGIN/../../..")
+if(UNIX)
+  get_relative_rpath(${${PYWRAP}_INSTALL_DIR} ${PYWRAP}_INSTALL_RPATH)
+  set_target_properties(${PYWRAP} PROPERTIES INSTALL_RPATH
+                                             "${${PYWRAP}_INSTALL_RPATH}")
 endif()
 
 install(TARGETS ${PYWRAP} DESTINATION ${${PYWRAP}_INSTALL_DIR})