On 08.01.2019 15:52, Enrico Sorichetti via Oorexx-devel wrote: > Right now You cannot relocate the installed thing > Because the rpath is an absolute one > I posted a few emails back the right constructs …
Hmm saw them, but was not sure what they were about and whether that was all that was needed (being totally unfamiliar with RPATH)! :( > Here they are again > > With these settings all works fine for me without bothering > To export DYLD_LIBRARY_PATH or LD_LIBRARY_PATH > > # do not skip the full RPATH for the build tree > SET( CMAKE_SKIP_BUILD_RPATH FALSE) > > # when building, don't use the install RPATH > # only later on when installing > SET( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) > > if( APPLE ) > SET( CMAKE_INSTALL_RPATH "@executable_path/../lib") > else() > SET( CMAKE_INSTALL_RPATH "$ORIGIN/../lib") > endif() > > # add the automatically determined parts of the RPATH > # which point to directories outside the build tree to the install RPATH > SET( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) Is it correct to state in this case that the executable's libraries then get automatically searched in the sibling "lib" directory? > Without the RPATH setting the exports are required > > ( tested on El Capitan, high Sierra, Mojave and Fedora 29 ) This is great, thank you very much indeed (also for your patience! :) ), will try it out on both MacOSX and Linux! > > Why would anybody set multiple paths ??? Well, in Windows the libraries are usually on the PATH and hence a standalone ("stick") version of ooRexx on Windows might have the dlls in the same directory as ooRexx. Even though Windows should not serve as the role model for Unix, nevertheless such layouts or solutions might be attempted (easier understandable) for users (not developers). People coming from Windows might therefore intend to place the shared libraries on Unix into the executable directory as well or move "lib" to become local to the executable directory (this way a subdirectory "oorexx" would point to the ooRexx executable and include all necessary files directly there, including the libraries or the "lib" directory). How would one add multiple RPATHs with CMake? Would just adding another directory to the path rpath with a colon be correct, something like: if( APPLE ) SET( CMAKE_INSTALL_RPATH "@executable_path/../lib:@executable_path/.") else() SET( CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/.") endif() Will test it, after first testing your "@executable_path/../lib" definition. Again, thank you very much, Enrico! ---rony _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel