Make APK file itself depend on renderdoc & renderdoccmd.

Previously the custom command wasn't running when .so's changed.
This commit is contained in:
Michael Rennie
2016-10-13 12:03:58 +01:00
committed by Baldur Karlsson
parent 475a526ee5
commit d38ad5e2c9
+4 -4
View File
@@ -50,15 +50,15 @@ add_custom_command(TARGET renderdoccmd POST_BUILD
add_custom_command(TARGET renderdoccmd POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:renderdoccmd> ${CMAKE_SOURCE_DIR}/bin/)
if(BUILD_ANDROID)
if(ANDROID)
set(APK_TARGET_ID "1" CACHE STRING "The Target ID to build the APK for, use <android list targets> to choose another one.")
set(APK_FILE ${CMAKE_BINARY_DIR}/RenderDocCmd.apk)
add_custom_target(apk ALL
DEPENDS ${APK_FILE}
DEPENDS renderdoc
DEPENDS renderdoccmd)
DEPENDS ${APK_FILE})
add_custom_command(OUTPUT ${APK_FILE}
DEPENDS renderdoc
DEPENDS renderdoccmd
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/renderdoccmd/android
COMMAND ${CMAKE_COMMAND} -E make_directory libs/${ANDROID_ABI}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:renderdoc> libs/${ANDROID_ABI}/$<TARGET_FILE_NAME:renderdoc>