mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-23 04:09:43 +00:00
549fac0475
Because we now build a single package, DESTDIR is actually `debian/<package-name>` rather than `debian/tmp` (see https://www.debian.org/doc/manuals/debmake-doc/ch05.en.html#rules). This means that we actually don't need to add `usr` to be installed; it's already installed to the staging directory. Additionally, setcap now respects the DESTDIR variable (used when building the Debian package).
19 lines
337 B
CMake
19 lines
337 B
CMake
include(FindSetcap)
|
|
|
|
function(setcap file caps)
|
|
install(CODE "execute_process(
|
|
COMMAND
|
|
${SETCAP_EXECUTABLE}
|
|
${caps}
|
|
\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${file}
|
|
RESULT_VARIABLE
|
|
_SETCAP_RESULT
|
|
)
|
|
if( _SETCAP_RESULT )
|
|
message( WARNING \"setcap failed (${_SETCAP_RESULT}).\")
|
|
endif()"
|
|
)
|
|
|
|
endfunction(setcap)
|
|
|