Re: [CMake] Dynamic linking doesn't work after install

2011-04-22 Thread Marcus D. Hanwell
On Fri, Apr 22, 2011 at 9:48 AM, David Doria  wrote:
> I have created an executable like this:
>
>  add_executable(ImageCompleter ${AppSources})
>  target_link_libraries(ImageCompleter ${LibrariesAlwaysUsed})
>
>  INSTALL( TARGETS ImageCompleter
>    RUNTIME DESTINATION ${INSTALL_DIR} )
>
> When I run the one that is created with 'make', it works fine.
> However, when I run the one that is copied by 'make install' I get:
>
> error while loading shared libraries: I get
> libwx_gtk2u_core-2.9.so.1: cannot open shared object file: No such
> file or directory
>
> It looks like this problem:
> http://www.cmake.org/pipermail/cmake/2010-July/038213.html
> but that link doesn't offer a solution.
>
> When I install it says
> -- Installing: /home/doriad/bin/Research/ImageCompleter
> -- Removed runtime path from "/home/doriad/bin/Research/ImageCompleter"
>
> I'm assuming that "removed runtime path" is the problem? How do I stop
> that from happening?
>
I think the CMake page on RPATHs might be what you are looking for.

http://www.cmake.org/Wiki/CMake_RPATH_handling

Marcus
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Dynamic linking doesn't work after install

2011-04-22 Thread David Doria
> I think the CMake page on RPATHs might be what you are looking for.
>
> http://www.cmake.org/Wiki/CMake_RPATH_handling
>
> Marcus
>

Yea I read that, but I didn't really follow/see how to fix this
problem. Surely there is a "just copy the executable" option?

David
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Dynamic linking doesn't work after install

2011-04-22 Thread Marcus D. Hanwell
On Fri, Apr 22, 2011 at 9:57 AM, David Doria  wrote:
>> I think the CMake page on RPATHs might be what you are looking for.
>>
>> http://www.cmake.org/Wiki/CMake_RPATH_handling
>
> Yea I read that, but I didn't really follow/see how to fix this
> problem. Surely there is a "just copy the executable" option?
>
Did you try,

SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

which is in one of the sections of that wiki article detailing using
full RPATH for installed binaries.

Marcus
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake