diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 195315e12e..354a49fccb 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -42,6 +42,7 @@ option(BUILD_REPLAY_LOADERS "Build GS replayer to ease testing (developer option option(PACKAGE_MODE "Use this option to ease packaging of PCSX2 (developer/distribution option)") option(DISABLE_CHEATS_ZIP "Disable including the cheats_ws.zip file") option(DISABLE_PCSX2_WRAPPER "Disable including the PCSX2-linux.sh file") +option(DISABLE_SETCAP "Do not set files capabilities") option(XDG_STD "Use XDG standard path instead of the standard PCSX2 path") option(EXTRA_PLUGINS "Build various 'extra' plugins") option(PORTAUDIO_API "Build portaudio support on spu2x" ON) diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 2b0db9fb73..7df58ba2a9 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -877,9 +877,11 @@ if (APPLE) endif() if(dev9ghzdrk) - if(PACKAGE_MODE) - install(CODE "execute_process(COMMAND /bin/bash -c \"echo 'Enabling networking capability on Linux...';set -x; [ -f ${BIN_DIR}/${Output} ] && sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' ${BIN_DIR}/${Output}; set +x\")") - else() - install(CODE "execute_process(COMMAND /bin/bash -c \"echo 'Enabling networking capability on Linux...';set -x; [ -f ${CMAKE_SOURCE_DIR}/bin/${Output} ] && sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' ${CMAKE_SOURCE_DIR}/bin/${Output}; set +x\")") + if(NOT DISABLE_SETCAP) + if(PACKAGE_MODE) + install(CODE "execute_process(COMMAND /bin/bash -c \"echo 'Enabling networking capability on Linux...';set -x; [ -f ${BIN_DIR}/${Output} ] && sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' ${BIN_DIR}/${Output}; set +x\")") + else() + install(CODE "execute_process(COMMAND /bin/bash -c \"echo 'Enabling networking capability on Linux...';set -x; [ -f ${CMAKE_SOURCE_DIR}/bin/${Output} ] && sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' ${CMAKE_SOURCE_DIR}/bin/${Output}; set +x\")") + endif() endif() -endif() \ No newline at end of file +endif()