In cmake 2.6, I could do something kind of bogus like this:
get_filename_component(MY_COMPILER_PREFIX ${CMAKE_C_COMPILER} PATH)
set(MY_RPATH ${MY_COMPILER_PREFIX}/../CentOS-5.7/x86_64/lib)
link_directories(${MY_RPATH})
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
and cmake would add an rpath to the libstdc++.so so I didn't have to
set LD_LIBRARY_PATH to run executables that I built.
I know it's hideously non-portable, but this is for a project that has
rather minimal portability requirements.
That behavior seems to no longer be present in cmake 3.x. Is there a
different way to achieve the same end?
Thanks,
B.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may
contain
confidential information. Any unauthorized review, use, disclosure or
distribution
is prohibited. If you are not the intended recipient, please contact the
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake