diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0ab646aca..0beadc3ec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -82,7 +82,9 @@ if(BUILD_SHARED_LIBS) list(TRANSFORM ONEMKL_LIBS PREPEND onemkl_) target_link_libraries(onemkl PUBLIC ${ONEMKL_LIBS}) set_target_properties(onemkl PROPERTIES - INSTALL_RPATH "\$ORIGIN") + INSTALL_RPATH "\$ORIGIN" + BUILD_WITH_INSTALL_RPATH TRUE + ) # Add the library to install package foreach(domain_lib ${ONEMKL_LIBS})