Samsung / cynara

simple privilege access control service
Apache License 2.0
25 stars 20 forks source link

Don't hardcode libdir #12

Closed tripzero closed 9 years ago

tripzero commented 9 years ago

cmake already has defined variables for libdir. It's best to use this instead of hardcoding our own which may break distro compatibility (specifically distros that support multilib).

lukaszwojciechowski commented 9 years ago

I don't like this solution, because: 1) a new variable has to be passed to cmake 2) this solution makes CMAKE_INSTALL_PREFIX do not work on lib directory.

I proposed another way to solve this problem using GNUInstallDirs Cmake module. Please review pullrequest #13

tripzero commented 9 years ago

IIRC, CMAKE_INSTALL_LIBDIR already includes CMAKE_INSTALL_PREFIX[1]. GNUInstallDirs changes the meaning of CMAKE_INSTALL_LIBDIR and removes the prefix. PR #13 will be identical to this for LIBDIR. That said, #13 also has changes necessary for other install locations, so its better. So close this one.

[1] - https://cmake.org/pipermail/cmake/2012-February/049206.html