1 # Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+
3 # Ensures a directory is absolute by prefixing CMAKE_INSTALL_PREFIX if it is not
4 # similar to CMAKE_INSTALL_FULL_... https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
5 function(set_full_dir var path)
6 if(NOT IS_ABSOLUTE "${path}")
7 message(STATUS "Prefixing in ${var} \"${path}\" with ${CMAKE_INSTALL_PREFIX}")
8 set(path "${CMAKE_INSTALL_PREFIX}/${path}")
10 set(${var} "${path}" PARENT_SCOPE)
11 endfunction(set_full_dir)