Use the GNUInstallDirs CMake module to get the install paths. by wRAR · Pull Request #133 · librsync/librsync

@wRAR

@wRAR

@wRAR wRAR mentioned this pull request

Oct 30, 2017

dbaarda

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly does this if section do? It looks to me like it sets CMAKE_INSTALL_RPATH to exactly the same thing it was set to above.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm wondering that too. The relevant commit is 75f6884.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, OK. It still doesn't make sense to me, but sure.

@dbaarda

I'm going to merge this as a minimal change to use the proper cmake install module stuff.

Further work that would be nice is adding the install for the man pages which is missing. However, that's something for another pull request.