ok well I figured this out finally.
The first trick was to get cmake to stop magically generating the RPATH based on what was linking to libcpprest ...
I found that adding the following line to CMakeLists.txt:
set(CMAKE_SKIP_BUILD_RPATH TRUE)
did the trick.
Then I was able to set RPATH on the casablanca binary to whatever I liked by adding another line:
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,/opt/foo/mynewlibs")
(in /opt/foo/mynewlibs I have my newly built boost/gcc shared libraries, kept separate from the old ones I have on my system)
and now everything looks sensible when I run 'ldd' on the binaries...
The first trick was to get cmake to stop magically generating the RPATH based on what was linking to libcpprest ...
I found that adding the following line to CMakeLists.txt:
set(CMAKE_SKIP_BUILD_RPATH TRUE)
did the trick.
Then I was able to set RPATH on the casablanca binary to whatever I liked by adding another line:
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,/opt/foo/mynewlibs")
(in /opt/foo/mynewlibs I have my newly built boost/gcc shared libraries, kept separate from the old ones I have on my system)
and now everything looks sensible when I run 'ldd' on the binaries...