I have received an answer on StackOverflow:

> Instead of linking to the existed project, please, create Minimal,
Complete, and Verifiable example <http://stackoverflow.com/help/mcve>. As
far as I understand, toolchain file can be compressed to two lines (setting
CMAKE_SYSTEM_NAME and BUILD_SHARED_LIBS variables). The project could also
be compressed to 10-20 lines, where one needn't to search through 100
lines, whether value for *INSTALL_RPATH* is absolute or relative path.
Setting variable *CMAKE_SYSTEM_NAME* always means *cross-compiling*. Do you
perform "fake" cross-compiling, when your *host* is the same as value for
*CMAKE_SYSTEM_NAME*?

My problem was that I was basing my toolchain file on some example I found
on the internet and it contained:

set(CMAKE_SYSTEM_NAME Darwin)

After I had removed this line everything started working perfectly without
any tweaks on *RPATH* variables as it had worked before I introduced a
custom toolchain file.

Thanks for attention.

Stan

On Fri, Feb 17, 2017 at 12:06 PM, Stanislav Pankevich <s.pankev...@gmail.com
> wrote:

> Hello,
>
> Let me cross-post my StackOverflow question here:
>
> http://stackoverflow.com/questions/42294460/setting-
> install-rpath-no-longer-works-when-i-start-using-a-custom-toolchain-file
>
> I am new to CMake, so maybe I am missing something simple there.
>
> Thanks,
>
> Stanislav
>
-- 

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-developers

Reply via email to