bioinfornatics/ldc — comment on commit 225ee5a504ce8e2479f96133915b997efe85a5b1
File:  line 0
By klickverbot:

So, again, the question is why you can't just use `CMAKE_INSTALL_PREFIX` then? This one is standardized across all projects using CMake – and, by the way, should *not* be set explicitly to `/usr` manually, as done in 32cbc79, because it will be filled with the appropriate default path automatically on Windows, … as well.

If the problem you want to solve is catching `SYSCONF_INSTALL_DIR` as well, I think we should rather respect `CMAKE_INSTALL_PREFIX` for it as well instead of adding yet another layer of confusion. To still match the common `/etc` default on *nix systems, we could set `SYSCONF_INSTALL_DIR` using something like this (untested):

```cmake
if (NOT DEFINED SYSCONF_INSTALL_DIR)
if(CMAKE_INSTALL_PREFIX STREQUAL "/usr")
set(SYSCONF_INSTALL_DIR "/etc")
else(CMAKE_INSTALL_PREFIX STREQUAL "/usr")
set(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc")
endif(CMAKE_INSTALL_PREFIX STREQUAL "/usr")
endif (NOT DEFINED SYSCONF_INSTALL_DIR)
```