aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2023-03-05 19:21:30 +1000
committerfuzzard <fuzzard@kodi.tv>2023-03-10 17:48:31 +1000
commit64dc308ae04e33c693c366d5a28d1c2a7a8e580c (patch)
treeeb01b26c3d74a07f9b4c20ee20c746c73ae316ae /cmake
parent9e8e7d6e7d3345ce3430354d35e44910ef688b28 (diff)
[cmake][android] add_bundle_file add support for IMPORTED targets
Diffstat (limited to 'cmake')
-rw-r--r--cmake/scripts/android/Install.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/scripts/android/Install.cmake b/cmake/scripts/android/Install.cmake
index 633f148347..9d90025d95 100644
--- a/cmake/scripts/android/Install.cmake
+++ b/cmake/scripts/android/Install.cmake
@@ -112,6 +112,18 @@ function(add_bundle_file file destination relative)
add_dependencies(bundle_files ${APP_NAME_LC})
endif()
+ if(TARGET ${file})
+ # Add support for IMPORTED lib targets
+ # If we need specific properties from other target types later, we can add them
+ # here with some validity checks
+ get_target_property(imploc_file ${file} IMPORTED_LOCATION)
+ if(imploc_file)
+ set(file ${imploc_file})
+ else()
+ return()
+ endif()
+ endif()
+
string(REPLACE "${relative}/" "" outfile ${file})
get_filename_component(file ${file} REALPATH)
get_filename_component(outdir ${outfile} DIRECTORY)