Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] Debug binary-addon packaging issues on android #10803

Merged
merged 2 commits into from
Oct 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/cmake/addons/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ if(NOT WIN32)
set(NEED_SUDO TRUE)
set(ADDON_INSTALL_DIR ${CMAKE_BINARY_DIR}/.install)
list(APPEND BUILD_ARGS -DOVERRIDE_PATHS=ON)
message(STATUS "NEED_SUDO: ${NEED_SUDO}")
message(STATUS "NEED_SUDO: ${NEED_SUDO} (no write permission for ${CMAKE_INSTALL_PREFIX})")
endif()
endif()

Expand Down
12 changes: 10 additions & 2 deletions project/cmake/scripts/common/CheckTargetPlatform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,18 @@ function(check_install_permissions install_dir have_perms)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${install_dir}/lib/kodi
COMMAND ${CMAKE_COMMAND} -E make_directory ${install_dir}/share/kodi
COMMAND ${CMAKE_COMMAND} -E touch ${install_dir}/lib/kodi/.cmake-inst-test ${install_dir}/share/kodi/.cmake-inst-test
RESULT_VARIABLE permtest)
RESULT_VARIABLE permtest
OUTPUT_VARIABLE output
ERROR_VARIABLE output
)

message(STATUS "============ DEBUG ADDON PACKAGING ======")
message(STATUS "check_install_permissions ${install_dir}: ${permtest}")
message(STATUS "${output}")
execute_process(COMMAND find ${install_dir})
execute_process(COMMAND ls -laR ${install_dir})

if(${permtest} GREATER 0)
message(STATUS "check_install_permissions: ${permtest}")
set(${have_perms} FALSE)
endif()
set(${have_perms} "${${have_perms}}" PARENT_SCOPE)
Expand Down