From 5c572108638f338213f26e8bc20d51a0652cfe6c Mon Sep 17 00:00:00 2001 From: Memphiz Date: Mon, 4 May 2015 22:27:22 +0200 Subject: [PATCH] [cmake] - only evaluate the sudo check on linux. On darwin with cmake 2.8.12 the execute_process with the multiple commands inside doesn't seem to work (it detects that it needs sudo and so it doesn't install into the addons dir). Bumping to cmake 3.2.2 was an other solution which made it work but bumping cmake is considered to dangerous at this stage. Fixes missing addons on ios and osx builds. --- project/cmake/addons/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/cmake/addons/CMakeLists.txt b/project/cmake/addons/CMakeLists.txt index 0773713cbf9c8..070c7c7532610 100644 --- a/project/cmake/addons/CMakeLists.txt +++ b/project/cmake/addons/CMakeLists.txt @@ -122,7 +122,7 @@ include(${APP_ROOT}/project/cmake/scripts/common/check_target_platform.cmake) # check install permissions set(ADDON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) check_install_permissions(${CMAKE_INSTALL_PREFIX} can_write) -if(NOT ${can_write} AND NOT WIN32) +if(NOT ${can_write} AND CMAKE_SYSTEM_NAME STREQUAL "Linux") set(NEED_SUDO TRUE) set(ADDON_INSTALL_DIR ${CMAKE_BINARY_DIR}/.install) message(STATUS "NEED_SUDO: ${NEED_SUDO}")