if(UNIX) include(GNUInstallDirs) set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") include(CheckIncludeFile) Check_Include_File(sys/auxv.h HAVE_SYS_AUXV) if(EXISTS "/lib/systemd/system") set(CMAKE_INSTALL_SYSTEMD_UNITDIR "/lib/systemd/system" CACHE STRING "Where to install systemd unit files") endif() endif()